Skip to content

Commit a6a6342

Browse files
Init passphrase when adding a secret
Fixes the issue where secret is attempted to be set before a stage is deployed and initialised the passphrase
1 parent ee9e97c commit a6a6342

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/project/provider/provider.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ func Cleanup(backend Home, app, stage string) error {
183183
}
184184

185185
func Purge(backend Home, app, stage string) error {
186-
if err := backend.removeData("secret", app, stage); err != nil {
186+
if err := backend.removeData("app", app, stage); err != nil {
187187
return err
188188
}
189-
if err := backend.removeData("app", app, stage); err != nil {
189+
if err := backend.removeData("secret", app, stage); err != nil {
190190
return err
191191
}
192192
if err := backend.removePassphrase(app, stage); err != nil {
@@ -375,7 +375,7 @@ func putData(backend Home, key, app, stage string, encrypt bool, data interface{
375375
return err
376376
}
377377
if encrypt {
378-
passphrase, err := Passphrase(backend, app, stage)
378+
passphrase, err := PassphraseInit(backend, app, stage)
379379
if err != nil {
380380
return err
381381
}

0 commit comments

Comments
 (0)