Add comments

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-04-17 14:08:47 +01:00
parent 92b0fef639
commit 12db888e74
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D
4 changed files with 10 additions and 0 deletions

View File

@ -32,6 +32,8 @@ export default async function buildKeytar(hakEnv: HakEnv, moduleInfo: Dependency
cwd: moduleInfo.moduleBuildDir, cwd: moduleInfo.moduleBuildDir,
env, env,
stdio: "inherit", stdio: "inherit",
// We need shell mode on Windows to be able to launch `.cmd` executables
// See https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
shell: hakEnv.isWin(), shell: hakEnv.isWin(),
}, },
); );

View File

@ -44,6 +44,8 @@ export default async function fetch(hakEnv: HakEnv, moduleInfo: DependencyInfo):
const proc = childProcess.spawn(hakEnv.isWin() ? "yarn.cmd" : "yarn", ["install", "--ignore-scripts"], { const proc = childProcess.spawn(hakEnv.isWin() ? "yarn.cmd" : "yarn", ["install", "--ignore-scripts"], {
stdio: "inherit", stdio: "inherit",
cwd: moduleInfo.moduleBuildDir, cwd: moduleInfo.moduleBuildDir,
// We need shell mode on Windows to be able to launch `.cmd` executables
// See https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
shell: hakEnv.isWin(), shell: hakEnv.isWin(),
}); });
proc.on("exit", (code) => { proc.on("exit", (code) => {

View File

@ -53,6 +53,8 @@ export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo):
const proc = childProcess.spawn(yarnCmd, ["link"], { const proc = childProcess.spawn(yarnCmd, ["link"], {
cwd: moduleInfo.moduleOutDir, cwd: moduleInfo.moduleOutDir,
stdio: "inherit", stdio: "inherit",
// We need shell mode on Windows to be able to launch `.cmd` executables
// See https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
shell: hakEnv.isWin(), shell: hakEnv.isWin(),
}); });
proc.on("exit", (code) => { proc.on("exit", (code) => {
@ -64,6 +66,8 @@ export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo):
const proc = childProcess.spawn(yarnCmd, ["link", moduleInfo.name], { const proc = childProcess.spawn(yarnCmd, ["link", moduleInfo.name], {
cwd: hakEnv.projectRoot, cwd: hakEnv.projectRoot,
stdio: "inherit", stdio: "inherit",
// We need shell mode on Windows to be able to launch `.cmd` executables
// See https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
shell: hakEnv.isWin(), shell: hakEnv.isWin(),
}); });
proc.on("exit", (code) => { proc.on("exit", (code) => {

View File

@ -33,6 +33,8 @@ export async function setPackageVersion(ver: string): Promise<void> {
ver, ver,
], ],
{ {
// We need shell mode on Windows to be able to launch `.cmd` executables
// See https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
shell: process.platform === "win32", shell: process.platform === "win32",
}, },
(err) => { (err) => {