diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-10-24 15:16:18 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-10-24 15:32:38 +0200 |
commit | d16fd2497374671c92cb877f9570d65783a77d99 (patch) | |
tree | ce2a871f4d9e5a65108768f1f8584cd545cbd6ac /src/libstore/machines.cc | |
parent | 3460e4cf007017e89096b4fad083692666b87a20 (diff) |
Allow shorter syntax for chroot stores
You can now say '--store /tmp/nix' instead of '--store local?root=/tmp/nix'.
Diffstat (limited to 'src/libstore/machines.cc')
-rw-r--r-- | src/libstore/machines.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/machines.cc b/src/libstore/machines.cc index d2faf4535..edd03d147 100644 --- a/src/libstore/machines.cc +++ b/src/libstore/machines.cc @@ -17,7 +17,11 @@ Machine::Machine(decltype(storeUri) storeUri, storeUri( // Backwards compatibility: if the URI is a hostname, // prepend ssh://. - storeUri.find("://") != std::string::npos || hasPrefix(storeUri, "local") || hasPrefix(storeUri, "remote") || hasPrefix(storeUri, "auto") + storeUri.find("://") != std::string::npos + || hasPrefix(storeUri, "local") + || hasPrefix(storeUri, "remote") + || hasPrefix(storeUri, "auto") + || hasPrefix(storeUri, "/") ? storeUri : "ssh://" + storeUri), systemTypes(systemTypes), |