nim-lang / nimble

Package manager for the Nim programming language.
https://nim-lang.github.io/nimble/index.html
Other
1.26k stars 192 forks source link

Yes/No prompt does not appear #1239

Open panno8M opened 4 months ago

panno8M commented 4 months ago

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.

https://github.com/nim-lang/nimble/blob/31dcee52708130383c048aeb31bfed6bd72a2b25/src/nimblepkg/cli.nim#L29-L30 https://github.com/nim-lang/nimble/blob/31dcee52708130383c048aeb31bfed6bd72a2b25/src/nimblepkg/cli.nim#L176-L190

melMass commented 4 months ago

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 commented 4 months ago

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 commented 3 months ago

I cannot reproduce this bug. image image

panno8M commented 3 months ago

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.