]> granicus.if.org Git - graphviz/commitdiff
remove non-portable default for $PATH
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 10 Apr 2021 00:02:34 +0000 (17:02 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 17 Apr 2021 22:24:44 +0000 (15:24 -0700)
Across the range of platforms Graphviz runs on, this is not a reasonable
default. E.g. Windows will have none of these paths and this is not even how one
separates paths in Windows $PATH. This is mostly a latent issue, as it is very
rare for $PATH to be unset.

CHANGELOG.md
lib/ast/pathbin.c

index 417c97dee0452e1c283a5a3670b73bdb3ba19e58..42ac394405d916ade4fba5031e8a4cd832734bac 100644 (file)
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+### Changed
+
+- $PATH is no longer assumed to be "/bin:/usr/bin:/usr/local/bin" if unset
+
 ## [2.47.1] - 2021-04-17
 
 ### Changed
index 5e2cefac8bd99a1d0af72972f16b8e2d26fd6a43..84803d5bf147b981a369a61c9d3611566b6285c3 100644 (file)
@@ -21,8 +21,8 @@ char *pathbin(void)
 {
     char *bin;
 
-    if (!(bin = getenv("PATH")) || !*bin) {
-       bin = "/bin:/usr/bin:/usr/local/bin";
+    if (!(bin = getenv("PATH"))) {
+       bin = "";
     }
     return bin;
 }