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

Incorrect path being made in .cmd wrapper on windows. #68

Open
rwaldron opened this issue Apr 12, 2019 · 4 comments
Open

Incorrect path being made in .cmd wrapper on windows. #68

rwaldron opened this issue Apr 12, 2019 · 4 comments

Comments

@rwaldron
Copy link

Following the execution path:

this.targetRelPath = `engines/${engine}`;

jsvu/shared/installer.js

Lines 131 to 132 in 853836d

const wrapperPath = process.platform === 'win32' ?
`%~dp0${this.targetRelPath}` :

const contents = generateScript(wrapperPath)

Which results in this:

@echo off
"%~dp0engines/v8\v8.exe" --natives_blob="%~dp0engines/v8\natives_blob.bin" --snapshot_blob="%~dp0engines/v8\snapshot_blob.bin" %*
@mathiasbynens
Copy link
Member

What's the expected result? What's broken exactly?

@rwaldron
Copy link
Author

Aren't these invalid windows paths?

  • engines/v8\v8.exe
  • engines/v8\natives_blob.bin
  • engines/v8\snapshot_blob.bin

This portion: engines/v8, which gets made in this.targetRelPath = `engines/${engine}`; is never passed through a path.normalize().

@mathiasbynens
Copy link
Member

cmd.exe accepts both \ and /. We could change the remaining / into \ on Windows but it would be an unobservable change 🤷🏼‍♂️

@mathiasbynens
Copy link
Member

To be clear, I'd definitely accept a patch that uses path.join instead of hardcoding the / in shared/installer.js. It's just not a priority IMHO since it doesn't change behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants