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

allow-scripts: config reader does not normalize paths #993

Open
boneskull opened this issue Feb 1, 2024 · 0 comments
Open

allow-scripts: config reader does not normalize paths #993

boneskull opened this issue Feb 1, 2024 · 0 comments
Labels
bug Something isn't working pkg:@lavamoat/allow-scripts Changes in package @lavamoat/allow-scripts windows windows-specific

Comments

@boneskull
Copy link
Contributor

The configuration for allow-scripts within package.json does no normalization of the path, e.g.:

"allowBins": {
  "good": "node_modules/good_dep/index.js"
}

This is passed verbatim, even if the platform is win32. The above path is invalid on Windows. It may be processed properly at some point, but it is inconsistent at best. Currently, for allow-scripts to work equivalently on a Windows machine, the consumer would need to change the option to:

"allowBins": {
  "good": "node_modules\\good_dep\\index.js"
}

Seems like a non-starter to me 😜

@boneskull boneskull added bug Something isn't working pkg:@lavamoat/allow-scripts Changes in package @lavamoat/allow-scripts windows windows-specific labels Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:@lavamoat/allow-scripts Changes in package @lavamoat/allow-scripts windows windows-specific
Projects
None yet
Development

No branches or pull requests

1 participant