-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Support for install scripts (ex. "postinstall") for "npm:" specifiers with global node modules #16164
Comments
Just to clarify: you would want to run the postinstall script which could execute arbitrary system binaries, and somehow you are able to constrain the permissions of these binaries based on the command line flags Deno received? |
No, that is not possible, it would work like any other Deno program that wants to spawn a subprocess - you would be prompted if you want to run a certain subprocess. |
In other words, passing |
Not clear at this moment, I'd err on the side of always prompting for postinstall scripts regardless of permissions passed on the CLI. |
Relating to the title of issue, caching |
I don't understand the focus on |
It meant the same thing in spirit. I renamed the issue. |
It would be great to have a way to configure it, instead of having to pass a lot of consecutive 'enter "Y"' in order to answerY/n in the CI though. |
For Sharp specifically, an exciting recent development is that there is a pre-release that presumably can install without custom scripts. I haven't tried it. |
@bartlomieju , found that this doesn't install the alpha though:
Result: 0.32.6 appear to be installed... Can I force it somehow? |
@birkskyum try with |
Great! --reload didn't work. I'll attempt to get Deno compiling locally, so that I easier can test against latest main going forward. |
Would it be a solution to prompt the user every time a postinstall is about to be fired with options like:
|
Maybe you can add flag --post-install for allowing some npm pkg to work with deno, until building an alternative solution more secure. secure solution may staticly analyze action needed for installing given npm pkg, and interactively ask user to allow needed permissions, ifnot possible to do so (analyze the code ) alert the user that can install this page with some risk (unkown) |
Fyi, Deno now supports this with the |
sorry this is not working for me... @elycheikhsmail @lpww |
@devlopersabbir What deno version are you running? Try updating to the latest version (v2.0.2) and try again. |
@lpww thanks brother, {
"tasks": {
"start": "deno run -A --watch src/main.ts",
"db:generate": "drizzle-kit generate --config=drizzle.config.ts",
"db:migrate": "drizzle-kit migrate --config=drizzle.config.ts"
}
} i'm going to create a REST api using hono and drizzle orm with pg database |
For support questions please come to Deno's Discord server at https://discord.gg/deno |
^^ by @dsherret
We should consider adding support for "postinstall" scripts, but instead of running them manually users would be prompted to confirm they indeed want postinstall script to run. In such case, the script would have permissions passed on the CLI applied with missing permissions being prompted for.
The text was updated successfully, but these errors were encountered: