Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Merge pull request #811 from profclems/scriptability
Browse files Browse the repository at this point in the history
commands: improve scriptability
  • Loading branch information
profclems authored Aug 10, 2021
2 parents 38aeb61 + c5f79cf commit 3dc01da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands/project/create/project_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func runCreateProject(cmd *cobra.Command, args []string, f *cmdutils.Factory) er
}
fmt.Fprintf(f.IO.StdOut, "%s Added remote %s\n", greenCheck, remote)

} else if f.IO.IsaTTY {
} else if f.IO.PromptEnabled() {
var doSetup bool
err := prompt.Confirm(&doSetup, fmt.Sprintf("Create a local project directory for %s?", project.NameWithNamespace), true)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion commands/ssh-key/get/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func NewCmdGet(f *cmdutils.Factory, runE func(*GetOpts) error) *cobra.Command {
opts.HTTPClient = f.HttpClient
opts.BaseRepo = f.BaseRepo

if len(args) == 0 && !opts.IO.IsOutputTTY() {
if len(args) == 0 && !opts.IO.PromptEnabled() {
return cmdutils.FlagError{Err: errors.New("<key-id> argument is required when running in non-ttys")}
}

Expand Down

0 comments on commit 3dc01da

Please sign in to comment.