This commit is contained in:
@ -196,7 +196,7 @@ environment. Typically, you can let Abra generate them for you on app creation
|
||||
if len(args) > 3 {
|
||||
data = args[3]
|
||||
} else if internal.NoInput {
|
||||
log.Fatal("Must provide <data> argument if --no-input is passed")
|
||||
log.Fatal(i18n.G("must provide <data> argument if --no-input is passed"))
|
||||
}
|
||||
|
||||
composeFiles, err := app.Recipe.GetComposeFiles(app.Env)
|
||||
@ -221,12 +221,15 @@ environment. Typically, you can let Abra generate them for you on app creation
|
||||
|
||||
if data == "" && !internal.NoInput {
|
||||
log.Debug("Secret data not provided on command-line, prompting")
|
||||
message := "Specify secret value"
|
||||
if insertFromFile {
|
||||
message = "Specify secret file"
|
||||
}
|
||||
prompt := &survey.Input{
|
||||
Message: i18n.G(message),
|
||||
var prompt survey.Prompt
|
||||
if !insertFromFile {
|
||||
prompt = &survey.Password{
|
||||
Message: i18n.G("Specify secret value"),
|
||||
}
|
||||
} else {
|
||||
prompt = &survey.Input{
|
||||
Message: i18n.G("Specify secret file"),
|
||||
}
|
||||
}
|
||||
if err := survey.AskOne(prompt, &data); err != nil {
|
||||
log.Fatal(err)
|
||||
|
Reference in New Issue
Block a user