nixos/nixos-generate-config: resolve abspath to root

This commit is contained in:
andr1an 2022-02-20 12:08:35 +03:00 committed by Artturin
parent 08b16191a9
commit 00487b5a87

View file

@ -52,6 +52,7 @@ for (my $n = 0; $n < scalar @ARGV; $n++) {
$rootDir = $ARGV[$n];
die "$0: --root requires an argument\n" unless defined $rootDir;
$rootDir =~ s/\/*$//; # remove trailing slashes
$rootDir = File::Spec->rel2abs($rootDir); # resolve absolute path
}
elsif ($arg eq "--force") {
$force = 1;