Skip to content

Commit

Permalink
Fix LineIntoFile duplication (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
kke authored Aug 8, 2022
1 parent fd33172 commit f710eda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion os/linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f710eda

Please sign in to comment.