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

the executable path should be bin/eslint #505

Merged
merged 1 commit into from
Nov 5, 2020
Merged

the executable path should be bin/eslint #505

merged 1 commit into from
Nov 5, 2020

Conversation

mathieudutour
Copy link
Contributor

@mathieudutour mathieudutour commented Nov 5, 2020

The fact that we are on Yarn Berry or newer doesn't change the executable path in the package.
Hence it should match the one used in installDirectly which is "bin/eslint".

Otherwise we get an error with

# This file contains the result of Yarn building a package (esbuild@npm:0.8.3)
# Script name: postinstall

Trying to install "esbuild-darwin-64" using npm
Failed to install "esbuild-darwin-64" using npm: ENOENT: no such file or directory, open '/Users/mathieudutour/Projects/gitbook-x/node_modules/esbuild/.install/node_modules/esbuild-darwin-64/esbuild'
Trying to download "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.8.3.tgz"
Failed to download "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.8.3.tgz": Could not find "package/esbuild" in archive
Install unsuccessful

The fact that we are on Yarn Berry or newer doesn't change the executable path in the package.
Hence it should match the one used in `installDirectly` which is `"bin/eslint"`
@evanw
Copy link
Owner

evanw commented Nov 5, 2020

Thanks for pointing this out. This code was from a PR so I didn't write this myself. I missed this during testing because esbuild caches previously-downloaded executables and I forgot to clear the cache before testing it. I don't think this is the right fix because it reverts the moving of the binary path on disk but I'll take it from here.

@evanw evanw merged commit dc062cb into evanw:master Nov 5, 2020
evanw added a commit that referenced this pull request Nov 5, 2020
@evanw
Copy link
Owner

evanw commented Nov 5, 2020

This should work now as of version 0.8.4.

@mathieudutour mathieudutour deleted the patch-1 branch November 6, 2020 07:32
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.

2 participants