Use OS-dependant pathListSeparator, when appending to PATH

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
Guillaume Tardif 2020-10-29 15:09:38 +01:00
parent 2ff803bf44
commit 5e809acd87
1 changed files with 1 additions and 1 deletions

View File

@ -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