If the user forgot generate-lockfile, we would fail with a confusing
ENOENT error from the command script. Instead, spot this situation.
This also gives us a place to do decide to mkdir -p or something.
Related to #5, but does not fix it completely.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
}
}
+sub consider_directories () {
+ return unless defined $oot_dir;
+ my $bsubdir = "../$oot_dir/$subdir";
+ return if stat $bsubdir;
+ die "$0: build directory $bsubdir inaccessible\n"
+ unless $!==ENOENT;
+ return if $cargo_lock_update; # will make it
+ die "$0: build directory $bsubdir does not exist, and not in Cargo.lock update mode!\n";
+}
+
our $cleanup_cargo_lock;
sub makebackups () {
foreach my $mf (keys %manifests) {
readorigs();
calculate();
addargs();
+consider_directories();
our @display_cmd = @ARGV;
oot_massage_cmdline();
setenvs();