aboutsummaryrefslogtreecommitdiff
path: root/src/nix-prefetch-url/nix-prefetch-url.cc
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2020-01-05 00:41:18 +0100
committerDaiderd Jordan <daiderd@gmail.com>2020-01-05 20:23:52 +0100
commit66fccd5832d125e9162abc5ed351aa37708e9623 (patch)
treed53d931a1975ef80893eb18617b9f39e91aae808 /src/nix-prefetch-url/nix-prefetch-url.cc
parent0de33cc81b9c33041b7db12a89d4480b9be3347e (diff)
build: fix sandboxing on darwin
Starting ba87b08f8529e4d9f8c58d8c625152058ceadb75 getEnv now returns an std::optional which means these getEnv() != "" conditions no longer happen if the variables are not defined.
Diffstat (limited to 'src/nix-prefetch-url/nix-prefetch-url.cc')
-rw-r--r--src/nix-prefetch-url/nix-prefetch-url.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-prefetch-url/nix-prefetch-url.cc b/src/nix-prefetch-url/nix-prefetch-url.cc
index 2ec0b07ac..cc0891811 100644
--- a/src/nix-prefetch-url/nix-prefetch-url.cc
+++ b/src/nix-prefetch-url/nix-prefetch-url.cc
@@ -53,7 +53,7 @@ static int _main(int argc, char * * argv)
{
HashType ht = htSHA256;
std::vector<string> args;
- bool printPath = getEnv("PRINT_PATH") != "";
+ bool printPath = getEnv("PRINT_PATH") == "1";
bool fromExpr = false;
string attrPath;
bool unpack = false;