X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/cec9366aea873ebe2dca710d42f78d080c7d1ff0..4496f723056b09b8d1dc17a40d0406232b58c646:/mr?ds=sidebyside diff --git a/mr b/mr index 470927a..5c9d6a3 100755 --- a/mr +++ b/mr @@ -298,10 +298,6 @@ sub action { } $ENV{MR_REPO}=$dir; - if (! $nochdir && ! chdir($dir)) { - print STDERR "mr $action: failed to chdir to $dir: $!\n"; - push @skipped, $dir; - } if (exists $config{$topdir}{$subdir}{skip}) { my $test="set -e;".$lib.$config{$topdir}{$subdir}{skip}; @@ -313,8 +309,12 @@ sub action { return; } } - - if (! exists $config{$topdir}{$subdir}{$action}) { + + if (! $nochdir && ! chdir($dir)) { + print STDERR "mr $action: failed to chdir to $dir: $!\n"; + push @failed, $dir; + } + elsif (! exists $config{$topdir}{$subdir}{$action}) { print STDERR "mr $action: no defined $action command for $topdir$subdir, skipping\n"; push @skipped, $dir; }