Skip to content

Commit 3403e9b

Browse files
committed
Flip --delete-stale to --keep-stale
1 parent 8bc6137 commit 3403e9b

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ Pass an addon directory, a [Steam Web API key](https://steamcommunity.com/dev/ap
1818
more Workshop collection IDs:
1919

2020
```bash
21-
workshop-sync --addons-dir ./addons --api-key <steam-web-api-key> --delete-stale 123456789 987654321
21+
workshop-sync --addons-dir ./addons --api-key <steam-web-api-key> 123456789 987654321
2222
```
2323

24-
The command installs or updates addons from the specified collections and
25-
removes previously managed addons that are no longer included, effectively keeping the addon
26-
directory in sync with those collections.
24+
The command installs or updates addons from the specified collections and removes previously
25+
managed addons that are no longer included, keeping the addon directory in sync with those
26+
collections.
2727

2828
The API key can also be provided through the `STEAM_WEB_API_KEY` environment variable.
2929

3030
Useful options:
3131

3232
- `--dry-run` prints the planned changes without modifying files.
33-
- `--delete-stale` removes managed addons that are no longer in the collections.
33+
- `--keep-stale` preserves managed addons that are no longer in the collections.
3434
- `--concurrency <number>` sets the number of concurrent downloads (default: `4`).
3535
- `--max-stalled-retries <number>` limits retries for downloads that stop making progress.
3636
- `--log-level <filter>` sets the tracing filter and defaults to `info`.

src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ pub struct Cli {
2222
#[arg(short = 'k', long, env = "STEAM_WEB_API_KEY", hide_env_values = true)]
2323
pub api_key: String,
2424

25-
/// Remove locally managed addon files that are not present in the requested collections.
25+
/// Keep locally managed addon files that are not present in the requested collections.
2626
#[arg(long)]
27-
pub delete_stale: bool,
27+
pub keep_stale: bool,
2828

2929
/// Print the plan without downloading, replacing, or deleting files.
3030
#[arg(long)]

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async fn main() -> eyre::Result<ExitCode> {
106106

107107
let mut deleted = 0usize;
108108
let mut delete_failed = 0usize;
109-
if cli.delete_stale && !plan.stale.is_empty() {
109+
if !cli.keep_stale && !plan.stale.is_empty() {
110110
let delete_stale = info_span!("delete_stale", indicatif.pb_show = Empty);
111111
delete_stale.pb_set_style(&logging::spinner_style());
112112
delete_stale.pb_set_message(&format!("Deleting {} stale addons", plan.stale.len()));

0 commit comments

Comments
 (0)