-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Windows 32 bit CI (Includes both ia32 and x64)
- Loading branch information
Showing
3 changed files
with
84 additions
and
21 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { exec } from 'child_process'; | ||
import { platform } from 'os'; | ||
|
||
// Function to check if the current platform is Windows | ||
function isWindows() { | ||
return platform() === 'win32'; | ||
} | ||
|
||
// Function to run npm install with specific architecture and force flag | ||
function runNpmInstall() { | ||
// Command to run npm install with architecture and force flag | ||
const command = 'npm install --arch=ia32 --force --package-lock-only --ignore-scripts'; | ||
|
||
// Execute the command | ||
exec(command, (error, stdout, stderr) => { | ||
if (error) { | ||
console.error(`Error running npm install: ${error.message}`); | ||
return; | ||
} | ||
if (stderr) { | ||
console.error(`stderr: ${stderr}`); | ||
return; | ||
} | ||
console.log(`npm install output: ${stdout}`); | ||
}); | ||
} | ||
|
||
// Check if the platform is Windows and run npm install if true | ||
if (isWindows()) { | ||
console.log('Installing additional ia32 Windows libraries...'); | ||
runNpmInstall(); | ||
} |