chiark / gitweb /
nailing-cargo: Fix handling of missing oot.use
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Jun 2020 18:29:52 +0000 (19:29 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Jun 2020 18:29:52 +0000 (19:29 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
nailing-cargo

index e737d78734607405e3671ae4d4c01f3a1bbda909..72abb09f9573c844615615a86da85c4502cbe061 100755 (executable)
@@ -283,7 +283,7 @@ sub consider_oot () {
     $cargo_lock_update=0;
     return;
   }
-  if ($use eq 'disable') {
+  if (($use//'') eq 'disable') {
     $oot_dir = undef;
     return;
   }
@@ -406,6 +406,7 @@ sub oot_massage_cmdline () {
   return unless defined $oot_dir;
 
   my $use = cfgs qw(oot use);
+  $use // die "$self: out-of-tree build, but \`oot.use' not configured\n";
   $oot_absdir = ($oot_dir !~ m{^/} ? "$worksphere/" : ""). $oot_dir;
   $build_absdir = "$oot_absdir/$subdir";