summaryrefslogtreecommitdiffstats
path: root/pkg/commands/os.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-02-20 20:01:29 +1100
committerJesse Duffield Duffield <jesseduffieldduffield@Jesses-MacBook-Pro-3.local>2019-02-24 09:42:34 +1100
commitcdc50e8557442fbe471c7f45cd88d6f2088dae71 (patch)
tree2335f4a57120a29d5e80731b51de0c8bd6c9b4d2 /pkg/commands/os.go
parent0173fdb9dfb763a13098be96d1693e19b01db8ca (diff)
more support for files with spaces
Diffstat (limited to 'pkg/commands/os.go')
-rw-r--r--pkg/commands/os.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/commands/os.go b/pkg/commands/os.go
index e5ae0a041..b6ef1a07f 100644
--- a/pkg/commands/os.go
+++ b/pkg/commands/os.go
@@ -208,7 +208,10 @@ func (c *OSCommand) AppendLineToFile(filename, line string) error {
defer f.Close()
_, err = f.WriteString("\n" + line)
- return errors.Wrap(err, 0)
+ if err != nil {
+ errors.Wrap(err, 0)
+ }
+ return nil
}
// CreateTempFile writes a string to a new temp file and returns the file's name