VS Code extension support for pnpm installed postgrestools #377
mattpetersen
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The VS Code extension, upon startup, copies the postgrestools binary to a temporary location, and executes it from there. This is to prevent locking the file on the user's system while the VS Code extension is running.
✅ This works if the binary were installed via
curl
, since it downloads a standalone executable file.✅ It also works if the binary were installed via
npm
, another recommended installation method.❌ However, if the binary were installed via
pnpm
, copying the binary causes it to fail to execute from its new location.The error we see is the following:
We might be able to use pnpm link, although it would make the exit cleanup more involved since we'd have to remove the local
node_modules
folder.Another solution would be to copy the executable to the same directory in which we found it, just with a new name. A new name is being used already, so this would be a pretty minimal change. We'd want to fail of course if such a file already exists.
I'm taking a look at this now - may open an MR tonight. Cheers!
Beta Was this translation helpful? Give feedback.
All reactions