Skip to content

Commit

Permalink
fix(retrieve): ensure retrieval destination is directory
Browse files Browse the repository at this point in the history
  • Loading branch information
bostrt committed Jun 30, 2022
1 parent 67e3c65 commit 7a61d05
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/retrieve/retrieve.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ func NewCmdRetrieve(config *pkg.Config) *cobra.Command {
}
if len(args) == 1 {
destinationDirectory = args[0]
if _, err := os.Stat(destinationDirectory); err != nil {
finfo, err := os.Stat(destinationDirectory)
if err != nil {
log.Error(err)
return
}
if !finfo.IsDir() {
log.Error("Retrieval destination must be directory")
return
}
}

s := status.NewStatusOptions(config)
Expand Down

0 comments on commit 7a61d05

Please sign in to comment.