-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
cd path does not work as expected #153
Comments
cc @lacker |
Oops. Looks like there is a |
It's not like this is a major bug in the global CLI, people can use it just fine as-is. With #152 merged we already have some changes there we have to release anyway. If there's no way to get a clean, simple solution for this outside the CLI I'd rather fix this is a new version of the CLI than hack around the issue with a bunch of fragile lines of code someplace else. |
Makes sense. I just need to be sure that "old CLI" and "new react-scripts" work together. So if there's something like passing an extra argument into the |
If you don't know about pushd and popd, this may be useful here http://unix.stackexchange.com/questions/77077/how-do-i-use-pushd-and-popd-commands |
#166 fixes this. I just changed the global-cli. don't think this should use pushd and popd because we want to be Windows-compatible. So it's better to only interact with the shell via the abstractions that Node provides. That's easier to code anyway ;-) |
When having created a new app,
create-react-app
outputs this information:As you can see, there's two absolute paths there, even though it doesn't really make sense to have the
cd
path be absolute. Instead, the instructions should show:Looking at the source of this, it seems like there was some sort of precaution taken to only show the absolute path when one is no longer in the original folder, but it's not working as expected since it shows the absolute path even when one is in the original folder:
(
hostPath
is absolute, it should only show theappName
when still in the original folder, as in my case)Something about this check is off:
path.join(process.cwd(), appName) === hostPath
. I'm not well versed enough in that part of the codebase to find the bug in this code, but maybe @vjeux or @gaearon have some idea?The text was updated successfully, but these errors were encountered: