mirror of
https://github.com/Luzifer/ots.git
synced 2025-05-15 04:22:20 -04:00
[#154] Improve UX for rejected / allowed files
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
dc47bf0861
commit
3ebc896169
3 changed files with 10 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue