-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spread: patch local script path in client
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/spread/client.go b/spread/client.go | ||
index c72d48a..e927567 100644 | ||
--- a/spread/client.go | ||
+++ b/spread/client.go | ||
@@ -791,7 +791,7 @@ func (s *localScript) run() (stdout, stderr []byte, err error) { | ||
buf.WriteString("NOMATCH() { { set +xu; } 2> /dev/null; local stdin=$(cat); if echo $stdin | grep -q -E \"$@\"; then echo \"NOMATCH pattern='$@' found in:\n$stdin\">&2; return 1; fi }\n") | ||
buf.WriteString("export DEBIAN_FRONTEND=noninteractive\n") | ||
buf.WriteString("export DEBIAN_PRIORITY=critical\n") | ||
- buf.WriteString("export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin\n") | ||
+ buf.WriteString(fmt.Sprintf("export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:%s\n", os.Getenv("PATH"))) | ||
|
||
for _, k := range s.env.Keys() { | ||
v := s.env.Get(k) |