mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-22 15:41:47 +00:00
Merge pull request #3797 from fluxcd/improve-messaging
better messaging for `pull artifact` command
This commit is contained in:
commit
cb8387cba6
1 changed files with 2 additions and 2 deletions
|
|
@ -67,11 +67,11 @@ func pullArtifactCmdRun(cmd *cobra.Command, args []string) error {
|
||||||
ociURL := args[0]
|
ociURL := args[0]
|
||||||
|
|
||||||
if pullArtifactArgs.output == "" {
|
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() {
|
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)
|
url, err := oci.ParseArtifactURL(ociURL)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue