Skip to content
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

fix: sdk build on windows needs shell: true to run batch files #14095

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion build/lib/android/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ class Android {

async function gradlew(args) {
await new Promise((resolve, reject) => {
const childProcess = spawn(GRADLEW_FILE_PATH, args, { cwd: TITANIUM_ANDROID_PATH, stdio: 'inherit' });
const childProcess = spawn(GRADLEW_FILE_PATH, args, {
cwd: TITANIUM_ANDROID_PATH,
shell: process.platform === 'win32',
stdio: 'inherit'
});
childProcess.on('error', reject);
childProcess.on('exit', (exitCode) => {
if (exitCode === 0) {
Expand Down
5 changes: 4 additions & 1 deletion build/lib/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ class Documentation {
const outputFile = path.join(this.outputDir, filename);

return new Promise((resolve, reject) => {
const prc = spawn(cmdPath, args, { cwd: DOC_DIR });
const prc = spawn(cmdPath, args, {
cwd: DOC_DIR,
shell: process.platform === 'win32'
});
prc.stdout.on('data', data => console.log(data.toString().trim()));
prc.stderr.on('data', data => console.error(data.toString().trim()));
prc.on('close', code => {
Expand Down
Loading