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

CLI: Change the directory to the new successfully cloned repo #2

Closed
edimitchel opened this issue Sep 8, 2022 · 3 comments
Closed

Comments

@edimitchel
Copy link

To avoid cd into the new repo after the cloning, add on the CLI an opt-in feature to do the directory change automatically

Bonus: an opt-out feature to automatically install deps using ni ?

@pi0
Copy link
Member

pi0 commented Sep 8, 2022

Both nice ideas! We can use process.chdir() so rest of Node.js operations are relative to new dir. But it won't update the CWD in shell that is running process. How do you imagine it?

For auto install, I'm working on another unjs package similar to ni. We could integrate it surely 👍🏼

@edimitchel
Copy link
Author

edimitchel commented Sep 8, 2022

Both nice ideas! We can use process.chdir() so rest of Node.js operations are relative to new dir. But it won't update the CWD in shell that is running process. How do you imagine it?

An unjs project to update cwd using a intelligent spawn('bash') ?

For auto install, I'm working on another unjs package similar to ni. We could integrate it surely 👍🏼
👍🏻

@pi0 pi0 closed this as completed in a04fc53 Sep 8, 2022
@pi0
Copy link
Member

pi0 commented Sep 8, 2022

Added an experimental --shell flag. Only stable implementation could find was using spawnSync and keeping current Node.js process alive (async stdin was unstable in MacOS at least to detach). If you have better ideas PR more than welcome 👍🏼

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

2 participants