Browse Source

Use OS-dependant pathListSeparator, when appending to PATH

Signed-off-by: Guillaume Tardif <[email protected]>
Guillaume Tardif 5 năm trước cách đây
mục cha
commit
5e809acd87
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      cli/main.go

+ 1 - 1
cli/main.go

@@ -73,7 +73,7 @@ func init() {
 	if err != nil {
 		fatal(errors.Wrap(err, "unable to get absolute bin path"))
 	}
-	if err := os.Setenv("PATH", fmt.Sprintf("%s:%s", os.Getenv("PATH"), path)); err != nil {
+	if err := os.Setenv("PATH", fmt.Sprintf("%s%s%s", os.Getenv("PATH"), os.PathListSeparator, path)); err != nil {
 		panic(err)
 	}
 	// Seed random