[#154] Improve UX for rejected / allowed files

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-12-01 18:54:46 +01:00
parent dc47bf0861
commit 3ebc896169
No known key found for this signature in database
GPG key ID: D91C3E91E4CAD6F5
3 changed files with 10 additions and 2 deletions

View file

@ -16,7 +16,7 @@ import (
const storeFileMode = 0o600 // We assume the attached file to be a secret
var fetchCmd = &cobra.Command{
Use: "fetch url",
Use: "fetch <url>",
Short: "Retrieves a secret from the instance by its URL",
Long: "",
Args: cobra.ExactArgs(1),
@ -39,6 +39,8 @@ func checkDirWritable(dir string) error {
}
func fetchRunE(cmd *cobra.Command, args []string) error {
cmd.SilenceUsage = true
fileDir, err := cmd.Flags().GetString("file-dir")
if err != nil {
return fmt.Errorf("getting file-dir parameter: %w", err)