* `!target`: cargo would reject `--target=<arch>`; in this case nailing-cargo's `-T` option is ineffective.
* `!target-dir`: cargo would reject `--target-dir`, so don't pass it. (Usually we pass `--target-dir=target` when we pass `--manifest-path`, since cargo's default is `target` in the same directory as `Cargo.toml`.)
-
There are also some properties which should not be needed, but are
provided for completeness. Do not use these to solve the problem
of nailing-cargo passing cargo options to a build command which is
* `!locked`: cargo would reject `--locked`, so don't pass it. Hazardous.
* `!offline`: the build command would reject `--offline`, so never pass it. *Not* overridden by configuration or command line.
+
* `--just-linkfarm`: Make the out-of-tree linkfarm as if for
`--cargo-lock-update`, but do not actually run any command, nor
try to copy back a a generated `Cargo.lock`.
+ * `--leave-nailed`: At the end, leave all the `Cargo.toml` files in
+ their edited state, rather than (trying to) clean them up. To
+ clean this up later, run `nailing-cargo` again without this option.
+ Without this option, the nailed versions are left in
+ `.Cargo.toml.nailed~`, so you only need this if you want to run
+ cargo by hand or something.
+
* `-h` | `--help`: Print usage summary.
* `--man` | `--manual`: Format this manual into html using `pandoc`
-h --help Print this message
--man --manual Display complete manual (in w3m)
--just-linkfarm Make the linkfarm as for -u, then stop
+ --leave-nailed Leave the nailed Cargo.toml in place
-s<subcommand> Treat command as `cargo <subcommand>`
--subcommand-props=<prop>,... Override command props (see docs)
our $pass_options;
our $online;
our $just_linkfarm;
+our $leave_nailed;
#
our %subcmd_props = (
} elsif (m{^--just-linkfarm$}) {
$just_linkfarm = 1;
$cargo_lock_update= 1;
+ } elsif (m{^--leave-nailed$}) {
+ $leave_nailed = 1;
} elsif (s{^--subcommand-props=}{}) {
my @props = split /\,/, $_;
our %subcmd_prop_ok;
exit 0 if $noact;
-$want_uninstall = 1;
+$want_uninstall = !$leave_nailed;
makebackups();
install();
cargo_lock_update_after();
-uninstall();
+uninstall() unless $leave_nailed;
$want_uninstall = 0;
print STDERR "$self: unnailed. status $estatus.\n" if $verbose;