about summary refs log tree commit diff
path: root/src/normalise.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-08-18T14·54+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-08-18T14·54+0000
commitebbb6ce578ab383bec7a61c364d2be27c0bad22f (patch)
tree65320c90cf5447878e8ba75125bd8c15df5ee443 /src/normalise.cc
parentc32e01eab2363085160bfebc2d9ab506d265c7e4 (diff)
* Most shells initialise PATH to some default (/bin:/usr/bin:...)
  when PATH is not set.  We don't want this, so fill it in with
  some dummy value. 

Diffstat (limited to 'src/normalise.cc')
-rw-r--r--src/normalise.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/normalise.cc b/src/normalise.cc
index 3d025d5f5aa1..ad79d83fc670 100644
--- a/src/normalise.cc
+++ b/src/normalise.cc
@@ -129,6 +129,11 @@ FSId normaliseFState(FSId id, FSIdSet pending)
     for (ElemMap::iterator i = inMap.begin(); i != inMap.end(); i++)
         refPaths.push_back(i->second.path);
 
+    /* Most shells initialise PATH to some default (/bin:/usr/bin:...) when
+       PATH is not set.  We don't want this, so we fill it in with some dummy
+       value. */
+    env["PATH"] = "/path-not-set";
+
     /* Build the environment. */
     for (StringPairs::iterator i = fs.derive.env.begin();
          i != fs.derive.env.end(); i++)