if upload fails, just return the error
@@ -25,7 +25,10 @@ func RunPrepare(opts *Options, args []string) (err error) {
sessId := getSessionIdFromFile(opts.Tenant)
response, err = doPrepare(opts, sessId)
} else if isFileOrDir(args[0]) {
- RunUpload(opts, args)
+ err := RunUpload(opts, args)
+ if err != nil {
+ return err
+ }
return RunPrepare(opts, []string{})
} else if looksLikeNumber(args[0]) {
response, err = doPrepare(opts, args[0])
