Skip to content

Commit

Permalink
cmd/oci-image-tool: error out if path destination does not exist
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
  • Loading branch information
runcom committed Jul 22, 2016
1 parent 116950e commit 6541392
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/oci-image-tool/create_runtime_bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ func (v *bundleCmd) Run(cmd *cobra.Command, args []string) {
os.Exit(1)
}

if _, err := os.Stat(args[1]); os.IsNotExist(err) {
v.stderr.Printf("destination path %s does not exist", args[1])
os.Exit(1)
}

if v.typ == "" {
typ, err := autodetect(args[0])
if err != nil {
Expand Down

0 comments on commit 6541392

Please sign in to comment.