You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently some packages, such as sass, install a bunch of .cmd, .ps1 and/or .bat entrypoints, but no actual executable. This works when invoking them manually from a shell. It even works in the Windows version of Make, which seems to have special support for finding and invoking .cmd/.bat files. But it doesn't work for programmatically creating a subprocess from another language.
For example, I have projects with a build script written in JS, which wants to run sass as a subprocess. For the version of sass installed by Chocolatey, this is possible, because there's sass.exe on the PATH. (The code is oversimplified.)
However, Scoop, for this package and probably many others, does not install an executable entrypoint, so this would fail. It's possible to work around this by "shelling out", going through cmd, but this creates another subprocess, increasing the likelihood of process leaks and accidental daemons; see #4362.
Solution
Scoop should always create an executable. Ideally, it would be self-contained, without relying on a subprocess. When not possible, it should invoke the "real" executable with the appropriate args (ideally without cmd indirection). It should also use the job objects API to ensure correct termination of any subprocesses; see #4362.
The text was updated successfully, but these errors were encountered:
mitranim
changed the title
Always create native executables
Always create native executables (even if they're shims)
May 26, 2021
Problem
Currently some packages, such as
sass
, install a bunch of.cmd
,.ps1
and/or.bat
entrypoints, but no actual executable. This works when invoking them manually from a shell. It even works in the Windows version of Make, which seems to have special support for finding and invoking.cmd
/.bat
files. But it doesn't work for programmatically creating a subprocess from another language.For example, I have projects with a build script written in JS, which wants to run
sass
as a subprocess. For the version ofsass
installed by Chocolatey, this is possible, because there'ssass.exe
on thePATH
. (The code is oversimplified.)However, Scoop, for this package and probably many others, does not install an executable entrypoint, so this would fail. It's possible to work around this by "shelling out", going through
cmd
, but this creates another subprocess, increasing the likelihood of process leaks and accidental daemons; see #4362.Solution
Scoop should always create an executable. Ideally, it would be self-contained, without relying on a subprocess. When not possible, it should invoke the "real" executable with the appropriate args (ideally without
cmd
indirection). It should also use the job objects API to ensure correct termination of any subprocesses; see #4362.The text was updated successfully, but these errors were encountered: