Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yes/No prompt does not appear #1239

Open
panno8M opened this issue Jul 8, 2024 · 4 comments
Open

Yes/No prompt does not appear #1239

panno8M opened this issue Jul 8, 2024 · 4 comments

Comments

@panno8M
Copy link

panno8M commented Jul 8, 2024

For example, when you run:

nimble install nonexistent

the following message should appear:

Prompt: nonexistent not found in any local packages.json, check internet for updated packages? [y/N]
Answer: 

But now nothing shows up.
It is likely that this is due to the wrong prioritization of silents.

Priority* = enum
DebugPriority, LowPriority, MediumPriority, HighPriority, SilentPriority

if globalCLI.level > SilentPriority:
display("Prompt:", question & " [y/N]", Warning, HighPriority)
displayCategory("Answer:", Warning, HighPriority)
let yn = stdin.readLine()
case yn.normalize
of "y", "yes":
return true
of "n", "no":
return false
else:
return false
else:
# Just say "yes" to every prompt, since we need to be
# 100% silent.
return true

panno8M added a commit to panno8M/nimble that referenced this issue Jul 8, 2024
@melMass
Copy link

melMass commented Jul 12, 2024

I get this personally or I did not understand what you meant:

nimble install nonexistant
Downloading Official package list
    Success Package list downloaded.
       Tip: 4 messages have been suppressed, use --verbose to show them.
download.nim(599)        getDownloadInfo

    Error:  Package nonexistant@any version not found.

@panno8M
Copy link
Author

panno8M commented Jul 12, 2024

Does it also display a yes/no prompt?
The correct output should be as follows.

    Prompt: nonexistent not found in any local packages.json, check internet for updated packages? [y/N]
    Answer: 

EDIT:
The first example was insufficient. My apologies.

@xTrayambak
Copy link
Contributor

I cannot reproduce this bug.
image
image

@panno8M panno8M changed the title CLI prompt does not appear Yes/No prompt does not appear Aug 4, 2024
@panno8M
Copy link
Author

panno8M commented Aug 4, 2024

The title and error content were ambiguous and have been corrected.

@xTrayambak
It is properly reproduced.
Normally, instead of exiting with an error, you should get a prompt asking if you want to update the package list.

Currently, the implementation skips all Yes/No prompts, not just this example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants