fix: add pass remove flag & show name is optional

This commit is contained in:
decentral1se 2022-03-12 09:17:24 +01:00
parent d3e127e5c8
commit 3fbd381f55
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
2 changed files with 14 additions and 4 deletions

View File

@ -157,18 +157,18 @@ var appSecretRmCommand = cli.Command{
Flags: []cli.Flag{ Flags: []cli.Flag{
internal.DebugFlag, internal.DebugFlag,
internal.NoInputFlag, internal.NoInputFlag,
allSecretsFlag, internal.PassFlag, allSecretsFlag,
internal.PassRemoveFlag,
}, },
Before: internal.SubCommandBefore, Before: internal.SubCommandBefore,
ArgsUsage: "<domain> <secret-name>", ArgsUsage: "<domain> [<secret-name>]",
BashComplete: autocomplete.AppNameComplete, BashComplete: autocomplete.AppNameComplete,
Description: ` Description: `
This command removes a secret from an app environment. This command removes app secrets.
Example: Example:
abra app secret remove myapp db_pass abra app secret remove myapp db_pass
`, `,
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
app := internal.ValidateApp(c) app := internal.ValidateApp(c)

View File

@ -28,6 +28,16 @@ var PassFlag = &cli.BoolFlag{
Destination: &Pass, Destination: &Pass,
} }
// PassRemove stores the variable for PassRemoveFlag
var PassRemove bool
// PassRemoveFlag turns on/off removing generated secrets from pass
var PassRemoveFlag = &cli.BoolFlag{
Name: "pass, p",
Usage: "Remove generated secrets from a local pass store",
Destination: &PassRemove,
}
// Force force functionality without asking. // Force force functionality without asking.
var Force bool var Force bool