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

Commit

Permalink
commands: improve scriptability
Browse files Browse the repository at this point in the history
Resolves #809
  • Loading branch information
profclems committed Aug 10, 2021
1 parent e6f5452 commit c5f79cf
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 c5f79cf

Please sign in to comment.