Skip to content

Commit

Permalink
Fix npm script
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sverdlov <[email protected]>
  • Loading branch information
sverdlov93 committed May 29, 2024
1 parent f08c00b commit 541ae52
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions general/ai/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"errors"
"fmt"
"github.com/jfrog/jfrog-cli-core/v2/utils/coreutils"
"github.com/jfrog/jfrog-cli-core/v2/utils/ioutils"
"github.com/jfrog/jfrog-cli/utils/cliutils"
"github.com/jfrog/jfrog-client-go/http/httpclient"
"github.com/jfrog/jfrog-client-go/utils/errorutils"
Expand Down Expand Up @@ -87,7 +86,17 @@ func HowCmd(c *cli.Context) error {
func (fb *FeedbackBody) getUserFeedback() {
fb.IsAccurate = coreutils.AskYesNo("Is the provided command accurate?", true)
if !fb.IsAccurate {
ioutils.ScanFromConsole("Please provide the exact command you expected (Example: 'jf rt u ...')", &fb.ExpectedAnswer, "")
scanner := bufio.NewScanner(os.Stdin)
fmt.Print("Please provide the exact command you expected (Example: 'jf rt u ...'): ")
for {
// Ask the user for a question
scanner.Scan()
fb.ExpectedAnswer = scanner.Text()
if fb.ExpectedAnswer != "" {
// If the user entered a question, break the loop
break
}
}
}
}

Expand Down

0 comments on commit 541ae52

Please sign in to comment.