Skip to content

Commit

Permalink
Fix bug with out of range in use command
Browse files Browse the repository at this point in the history
  • Loading branch information
dm3ch committed Jul 7, 2019
1 parent 7177ead commit 118106a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/use.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var useCmd = &cobra.Command{
os.Exit(1)
}

if dir[len(dir)-1] != '/' {
if dir != "" && dir[len(dir)-1] != '/' {
dir += "/"
}

Expand Down

0 comments on commit 118106a

Please sign in to comment.