about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-10-09T15·37+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-10-09T15·37+0000
commit6409c215e56cbcd10177edf358f7d0702d687099 (patch)
tree1ba0c36d3b27da14d31cb1d130fffc01b8d53d86
parent6baa2c442035fb06652a7fad9d51df1ce41c05f9 (diff)
* Fixed nix-switch.
-rwxr-xr-xscripts/nix-switch.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/nix-switch.in b/scripts/nix-switch.in
index 427a803b2b17..85fa3ac44ad9 100755
--- a/scripts/nix-switch.in
+++ b/scripts/nix-switch.in
@@ -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"; }