set PATH in main instead of run_setup
This commit is contained in:
parent
0383efc554
commit
8bc6a4daa9
1 changed files with 5 additions and 10 deletions
15
mmdebstrap
15
mmdebstrap
|
@ -1959,15 +1959,6 @@ sub run_setup() {
|
|||
}
|
||||
}
|
||||
|
||||
# setting PATH for chroot, ldconfig, start-stop-daemon...
|
||||
if (length $ENV{PATH}) {
|
||||
## no critic (Variables::RequireLocalizedPunctuationVars)
|
||||
$ENV{PATH} = "$ENV{PATH}:/usr/sbin:/usr/bin:/sbin:/bin";
|
||||
} else {
|
||||
## no critic (Variables::RequireLocalizedPunctuationVars)
|
||||
$ENV{PATH} = "/usr/sbin:/usr/bin:/sbin:/bin";
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4334,7 +4325,11 @@ sub main() {
|
|||
error "invalid format. Choose from " . (join ', ', @valid_formats);
|
||||
}
|
||||
|
||||
if (!defined $ENV{PATH} || $ENV{PATH} eq "") {
|
||||
# setting PATH for chroot, ldconfig, start-stop-daemon...
|
||||
if (length $ENV{PATH}) {
|
||||
## no critic (Variables::RequireLocalizedPunctuationVars)
|
||||
$ENV{PATH} = "$ENV{PATH}:/usr/sbin:/usr/bin:/sbin:/bin";
|
||||
} else {
|
||||
## no critic (Variables::RequireLocalizedPunctuationVars)
|
||||
$ENV{PATH} = "/usr/sbin:/usr/bin:/sbin:/bin";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue