Skip to content

Commit

Permalink
fix pipe check (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kutluhan Metin authored Aug 22, 2023
1 parent 16630d8 commit b4d1a70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clc/config/wizard/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ func maybeUnwrapStdout(ec plug.ExecContext) any {
}

func (p *Provider) ClientConfig(ctx context.Context, ec plug.ExecContext) (hazelcast.Config, error) {
if terminal.IsPipe(maybeUnwrapStdout(ec)) {
return hazelcast.Config{}, fmt.Errorf(`no configuration was provided and cannot display the configuration wizard; use the --config flag`)
}
cfg, err := p.fp.Load().ClientConfig(ctx, ec)
if err != nil {
if terminal.IsPipe(maybeUnwrapStdout(ec)) {
return hazelcast.Config{}, fmt.Errorf(`no configuration was provided and cannot display the configuration wizard; use the --config flag`)
}
// ask the config to the user
name, err := p.runWizard(ctx, ec)
if err != nil {
Expand Down

0 comments on commit b4d1a70

Please sign in to comment.