Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 297d872

Browse files
committed
Update error returning when asking for template variable
1 parent 82e4223 commit 297d872

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

internals/secrethub/variable_reader.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ func (p *promptMissingVariableReader) ReadVariable(name string) (string, error)
6868
variable, err := p.reader.ReadVariable(name)
6969
if err == tpl.ErrTemplateVarNotFound(name) {
7070
question := fmt.Sprintf("What is the value of the \"%s\" template variable?", name)
71-
return ui.Ask(p.io, question)
71+
answer, askErr := ui.Ask(p.io, question)
72+
if askErr != nil {
73+
return "", err
74+
}
75+
return answer, nil
7276
} else if err != nil {
7377
return "", err
7478
}

0 commit comments

Comments
 (0)