mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
* Fixed nix-switch.
This commit is contained in:
parent
6baa2c4420
commit
6409c215e5
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ while ($argnr < scalar @ARGV) {
|
|||
if ($arg eq "--keep") { $keep = 1; }
|
||||
elsif ($arg eq "--source-root") { $sourceroot = 1; }
|
||||
elsif ($arg eq "--name") { $name = $ARGV[$argnr++]; }
|
||||
elsif ($arg =~ /^([0-9a-z]{32})$/) { $srcid = $arg; }
|
||||
elsif ($arg =~ /^\//) { $srcid = $arg; }
|
||||
else { die "unknown argument `$arg'" };
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ my $linkdir = "@localstatedir@/nix/links";
|
|||
my $nfid = `nix --install $srcid`;
|
||||
if ($?) { die "`nix --install' failed"; }
|
||||
chomp $nfid;
|
||||
die unless $nfid =~ /^([0-9a-z]{32})$/;
|
||||
die unless $nfid =~ /^\//;
|
||||
|
||||
my $pkgdir = `nix --query --list $nfid`;
|
||||
if ($?) { die "`nix --query --list' failed"; }
|
||||
|
|
Loading…
Reference in a new issue