Skip to content
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.

More than 3 parent directories (..) in path ignored on Windows #244

Closed
abidingotter opened this issue Jun 12, 2020 · 2 comments
Closed

More than 3 parent directories (..) in path ignored on Windows #244

abidingotter opened this issue Jun 12, 2020 · 2 comments

Comments

@abidingotter
Copy link

  • cross-env version: 7.0.2
  • node version: 12.18.0
  • npm (or yarn) version: 6.14.5

Multiple parent directories (in my case, 5) has been treated as 3

package.json

{
...
  "scripts": {
    "prepare": "cross-env-shell \"cd ../../../../../otherproject && npm ci build\""

Output

> cross-env-shell "cd ../../../../../otherproject && npm ci build"

'..\..\..\otherproject ' is not recognized as an internal or external command,
operable program or batch file.
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn ..\..\..\otherproject && npm ci build ENOENT
    at notFoundError (….\node_modules\cross-spawn\lib\enoent.js:6:26)

Note that only three sets of ".." are present in the error. Placing an absolute path in the command works, so the problem is restricted to the parsing of the parent directories.

@abidingotter abidingotter changed the title More than 3 parent directories (..) in path ignored More than 3 parent directories (..) in path ignored on Windows Jun 19, 2020
@abidingotter
Copy link
Author

Note that this is not an issue for the developers using a Linux based OS

@kentcdodds
Copy link
Owner

#257

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

2 participants