socket-patch repair
Restore vendored packages or agent patch data that are missing or damaged
socket-patch repair puts back patch files that are missing or damaged, and removes ones nothing uses any more. It works from the records the project already has.
- Hosted mode has nothing to repair: the patched packages are not stored in the project.
- Vendored mode. It downloads a missing or corrupt package again and checks it against the ledger before replacing it. It can't rebuild a lost ledger: restore
.socket/vendor/state.jsonfrom version control. - Agent mode. It downloads missing patch data into
.socket/blobs/. --download-onlydownloads what is missing and skips the cleanup.--offlineruns the cleanup only.- It never changes which patches the project uses. To add or update patches, use
socket-patch scan.
socket-patch repair --dry-run # preview
socket-patch repair
socket-patch repair --download-onlysocket-patch repair -h
-h prints the common options shown here. socket-patch repair --help prints every option.
$ socket-patch repair -h
Restore agent or vendored patch artifacts and clean up unused ones
Usage: socket-patch repair [OPTIONS]
Options:
--download-only Only download missing artifacts; skip the cleanup phase. Incompatible with
`--offline` [env: SOCKET_DOWNLOAD_ONLY=]
-h, --help Print help (see more with '--help')
-V, --version Print version
Global options:
--cwd <CWD> Working directory [env: SOCKET_CWD=] [default: .]
-e, --ecosystems <ECOSYSTEMS> Restrict to these ecosystems (comma-separated): npm, pypi, cargo,
gem, golang, maven, composer, nuget, deno [env: SOCKET_ECOSYSTEMS=]
--offline Disable network access; fail if remote data is needed [env:
SOCKET_OFFLINE=]
-j, --json Emit machine-readable JSON output [env: SOCKET_JSON=]
--dry-run Preview the operation without making any mutations [env:
SOCKET_DRY_RUN=]Updated about 3 hours ago
Did this page help you?