1
0
mirror of synced 2026-03-20 17:46:55 +00:00

Merge pull request #3797 from fluxcd/improve-messaging

better messaging for `pull artifact` command
This commit is contained in:
Max Jonas Werner
2023-04-13 13:20:53 +02:00
committed by GitHub

View File

@@ -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)