From 00487b5a87cff8c0970a64a040377949ffa11b1a Mon Sep 17 00:00:00 2001 From: andr1an Date: Sun, 20 Feb 2022 12:08:35 +0300 Subject: [PATCH] nixos/nixos-generate-config: resolve abspath to root --- nixos/modules/installer/tools/nixos-generate-config.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index 57aef50a0f6b..1a9b1d061cf1 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -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;