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

Add workaround for pushd and popd to README #122

Merged
merged 1 commit into from
Aug 22, 2017

Conversation

eteeselink
Copy link
Contributor

As discussed in #121.

@codecov-io
Copy link

codecov-io commented Aug 19, 2017

Codecov Report

Merging #122 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #122   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines          22     22           
=====================================
  Hits           22     22

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a73e66d...688df45. Read the comment docs.

@@ -85,8 +85,8 @@ Due to the differences in execution environments between ShellJS and `shx` (JS v
| Unsupported command | Recommend workaround |
| ------------------- | -------------------- |
| `shx cd` | Just use plain old `cd` (it's the same on windows too) |
| `shx pushd` | No workaround |
| `shx popd` | No workaround |
| `shx pushd` | Just use plain old `pushd`. Use forward slashes and double-quote the path. (e.g. `pushd "../docs"`. This would fail on Windows without the quotes) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you point me to a source explaining why this fails? As I recall (memory is a bit hazy) cmd.exe generally respects forward slashes as path separators. I don't remember quotes really being needed for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most cmd commands and all cmd examples expect backward slashes (like all of Windows). Some commands however support forward slashes, and so do the lower level win32 API functions. Other cmd commands, however, choke on forward slashes and I don't know why. The only explanation I have is this:

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, ok. Good enough for me, thanks for the screenshot.

@nfischer nfischer merged commit bc803b7 into shelljs:master Aug 22, 2017
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

Successfully merging this pull request may close these issues.

3 participants