Merge pull request #3797 from fluxcd/improve-messaging

better messaging for `pull artifact` command
pull/3804/head
Max Jonas Werner 2 years ago committed by GitHub
commit cb8387cba6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -67,11 +67,11 @@ func pullArtifactCmdRun(cmd *cobra.Command, args []string) error {
ociURL := args[0]
if pullArtifactArgs.output == "" {
return fmt.Errorf("invalid output path %s", pullArtifactArgs.output)
return fmt.Errorf("output path cannot be empty")
}
if fs, err := os.Stat(pullArtifactArgs.output); err != nil || !fs.IsDir() {
return fmt.Errorf("invalid output path %s", pullArtifactArgs.output)
return fmt.Errorf("invalid output path %q: %w", pullArtifactArgs.output, err)
}
url, err := oci.ParseArtifactURL(ociURL)

Loading…
Cancel
Save