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

How to exit REPL? #2423

Closed
qortex opened this issue Jul 26, 2022 · 7 comments
Closed

How to exit REPL? #2423

qortex opened this issue Jul 26, 2022 · 7 comments

Comments

@qortex
Copy link

qortex commented Jul 26, 2022

So nice to have REPL in v9!

I use Ctrl+C to exit REPL.

Is it the correct way?

I would expect Ctrl+C to just ignore current command. And then exit if repeated.

Wondering if there is another way (tried .exit & co)

@micalevisk
Copy link
Member

as that REPL is just the same as the nodejs REPL, ctrl+c and .exit should kill the app.

Feel free to open an issue at https://github.com/nestjs/nest if you have some app that doesn't exit on that manner.

I notice that it doesn't work that well when we use the watch mode (maybe it's related with nestjs/nest-cli#1487)

demo.mp4

@Tony133
Copy link
Contributor

Tony133 commented Jul 31, 2022

I confirm that in watch mode the .exit does not work. (see screenshot)

screnshot

@qortex
Copy link
Author

qortex commented Jul 31, 2022

Ok, then .exit and Ctrl+C do not work as expected, I don't think I use watch mode.
I am in an Nx environment so maybe it is related?
Will investigate and open an issue if I understand more on the issue.

Leaving this open if more bug reports flow in.

@Tony133
Copy link
Contributor

Tony133 commented Jul 31, 2022

Without the watch mode the .exit and CTRL + D works perfectly, also the CTRL + C it is used for abort current expression, not to exit REPL.

screenshot

@jmcdo29
Copy link
Member

jmcdo29 commented Jul 31, 2022

Ok, then .exit and Ctrl+C do not work as expected, I don't think I use watch mode. I am in an Nx environment so maybe it is related? Will investigate and open an issue if I understand more on the issue.

Leaving this open if more bug reports flow in.

@qortex What is the command you use in the nx repo? IIRC, Nx's @nrwl/node:node executor has watch set as true by default, so you would be in a watch mode which could contribute to what you're seeing

@qortex
Copy link
Author

qortex commented Aug 1, 2022

@qortex What is the command you use in the nx repo? IIRC, Nx's @nrwl/node:node executor has watch set as true by default, so you would be in a watch mode which could contribute to what you're seeing

Yes that is exactly the case. Thanks!
So it makes sense the bug shows up.

@kamilmysliwiec
Copy link
Member

Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.

@nestjs nestjs locked and limited conversation to collaborators Aug 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants