diff --git a/os/linux.go b/os/linux.go index 2957fe41..62baa555 100644 --- a/os/linux.go +++ b/os/linux.go @@ -266,7 +266,7 @@ func (c Linux) LineIntoFile(h Host, path, matcher, newLine string) error { // UpdateEnvironment updates the hosts's environment variables func (c Linux) UpdateEnvironment(h Host, env map[string]string) error { for k, v := range env { - err := c.LineIntoFile(h, "/etc/environment", fmt.Sprintf("^%s=", k), fmt.Sprintf("%s=%s", k, v)) + err := c.LineIntoFile(h, "/etc/environment", fmt.Sprintf("%s=", k), fmt.Sprintf("%s=%s", k, v)) if err != nil { return err }