diff --git a/backend/local/cli.go b/backend/local/cli.go index f0221b7bde..3385e66393 100644 --- a/backend/local/cli.go +++ b/backend/local/cli.go @@ -14,10 +14,16 @@ func (b *Local) CLIInit(opts *backend.CLIOpts) error { b.OpValidation = opts.Validation b.RunningInAutomation = opts.RunningInAutomation - // Only configure state paths if we didn't do so via the configure func. - if b.StatePath == "" { + // configure any new cli options + if opts.StatePath != "" { b.StatePath = opts.StatePath + } + + if opts.StateOutPath != "" { b.StateOutPath = opts.StateOutPath + } + + if opts.StateBackupPath != "" { b.StateBackupPath = opts.StateBackupPath }