From: Ian Jackson Date: Sun, 13 Sep 2020 23:27:32 +0000 (+0100) Subject: Provide --just-run X-Git-Tag: nailing-cargo/1.0.0~55 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=c041aae649e9ca3e097976c43d4c66f51ac946eb;p=nailing-cargo.git Provide --just-run This is safer than asking the uxer to pass --no-nail --no-lock-manip --no-concurrency-lock. Signed-off-by: Ian Jackson --- diff --git a/README.md b/README.md index b57d2a7..8d96eb2 100644 --- a/README.md +++ b/README.md @@ -379,6 +379,14 @@ Options `.Cargo.toml.nailed~`, so you only need this if you want to run cargo by hand or something. + * `--just-run`: Execute the specified command (perhaps concurrently + with other commands), but do not manipulate any of Cargo's + metadata fiules. Useful in out of tree mode to invoke a non-cargo + command in the build environment. Implies `--no-nail`, + `--no-cargo-lock-manip` and `--no-concurrency-lock` (overrideable + by later occurrences of the corresponding opposite options). + Hazardous if the command is actually cargo, or will run cargo. + * `--no-nail` | `--nail` (default): Whether to actually nail - ie, whether to actually modify any `Cargo.toml`s while running the command. This can be useful, e.g., in out-of-tree mode with diff --git a/nailing-cargo b/nailing-cargo index cd9160c..d31b9fb 100755 --- a/nailing-cargo +++ b/nailing-cargo @@ -28,6 +28,7 @@ options: --man --manual Display complete manual (in w3m) --leave-nailed Leave the nailed Cargo.toml in place --just-linkfarm | --clean-linkfarm | --keep-linkfarm (default) + --just-run Run the command, don't do cargo stuff --no-nail Do not nail, just run the command. --no-cargo-lock-manip Do not manipulate Cargo.lock. --no-concurrency-lock Do not take the concurrency lock. @@ -949,6 +950,8 @@ sub parse_args () { } elsif (m{^--just-linkfarm$}) { $just_linkfarm = 1; $cargo_lock_update= 1; + } elsif (m{^--just-run$}) { + $do_nail = $do_cargo_lock = $do_lock = 0; } elsif (m{^--(clean|keep)-linkfarm$}) { $oot_clean = $1 eq 'clean'; } elsif (m{^--(no)?-nail$}) {