mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 15:34:59 +01:00
[Backport staging] Update scripts for compatibility with latest NodeJS Security Release (#1629)
Co-authored-by: David Baker <dbkr@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
201c904c61
commit
af0a56061f
@ -32,6 +32,9 @@ 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(),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
proc.on("exit", (code) => {
|
proc.on("exit", (code) => {
|
||||||
|
@ -44,6 +44,9 @@ 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(),
|
||||||
});
|
});
|
||||||
proc.on("exit", (code) => {
|
proc.on("exit", (code) => {
|
||||||
code ? reject(code) : resolve();
|
code ? reject(code) : resolve();
|
||||||
|
@ -53,6 +53,9 @@ 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(),
|
||||||
});
|
});
|
||||||
proc.on("exit", (code) => {
|
proc.on("exit", (code) => {
|
||||||
code ? reject(code) : resolve();
|
code ? reject(code) : resolve();
|
||||||
@ -63,6 +66,9 @@ 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(),
|
||||||
});
|
});
|
||||||
proc.on("exit", (code) => {
|
proc.on("exit", (code) => {
|
||||||
code ? reject(code) : resolve();
|
code ? reject(code) : resolve();
|
||||||
|
@ -32,6 +32,11 @@ export async function setPackageVersion(ver: string): Promise<void> {
|
|||||||
"--new-version",
|
"--new-version",
|
||||||
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",
|
||||||
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
reject(err);
|
reject(err);
|
||||||
|
Loading…
Reference in New Issue
Block a user