chiark / gitweb /
Provide --just-run
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 13 Sep 2020 23:27:32 +0000 (00:27 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 13 Sep 2020 23:27:32 +0000 (00:27 +0100)
This is safer than asking the uxer to pass --no-nail --no-lock-manip
--no-concurrency-lock.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
README.md
nailing-cargo

index b57d2a7035adfc5372b08393a7af97e1d4e368b3..8d96eb2cf23bec2a68e15925ad931002496b463f 100644 (file)
--- 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
index cd9160cc43cea2e3d19b2485c2c40bc371c9b5df..d31b9fbde92a385c41389ff02ec443a164c0ac9c 100755 (executable)
@@ -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$}) {