mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
nixos/nixos-generate-config: resolve abspath to root
This commit is contained in:
parent
08b16191a9
commit
00487b5a87
1 changed files with 1 additions and 0 deletions
|
@ -52,6 +52,7 @@ for (my $n = 0; $n < scalar @ARGV; $n++) {
|
||||||
$rootDir = $ARGV[$n];
|
$rootDir = $ARGV[$n];
|
||||||
die "$0: ‘--root’ requires an argument\n" unless defined $rootDir;
|
die "$0: ‘--root’ requires an argument\n" unless defined $rootDir;
|
||||||
$rootDir =~ s/\/*$//; # remove trailing slashes
|
$rootDir =~ s/\/*$//; # remove trailing slashes
|
||||||
|
$rootDir = File::Spec->rel2abs($rootDir); # resolve absolute path
|
||||||
}
|
}
|
||||||
elsif ($arg eq "--force") {
|
elsif ($arg eq "--force") {
|
||||||
$force = 1;
|
$force = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue