Skip to content

Commit

Permalink
Resolve paths to absolute otherwise bin rm won't work
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosnils committed Mar 24, 2021
1 parent 7cec71d commit 452b301
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ func newInstallCmd() *installCmd {

var path string
if len(args) > 1 {
path = args[1]
var err error
// Resolve to absolute path
if path, err = filepath.Abs(args[1]); err != nil {
return err
}
} else if len(config.Get().DefaultPath) > 0 {
path = config.Get().DefaultPath
} else {
Expand Down

0 comments on commit 452b301

Please sign in to comment.