diff options
Diffstat (limited to 'cmd/install/install.go')
| -rw-r--r-- | cmd/install/install.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/install/install.go b/cmd/install/install.go index 0a93128..f6123d1 100644 --- a/cmd/install/install.go +++ b/cmd/install/install.go @@ -81,5 +81,9 @@ func rcFile(name string) string { if err != nil { return "" } - return filepath.Join(u.HomeDir, name) + path := filepath.Join(u.HomeDir, name) + if _, err := os.Stat(path); err != nil { + return "" + } + return path } |
