Skip to content

Commit f3e5a0b

Browse files
authored
fix: sdk build on windows needs shell: true to run batch files (#14095)
1 parent 9eed7f9 commit f3e5a0b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

build/lib/android/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@ class Android {
173173

174174
async function gradlew(args) {
175175
await new Promise((resolve, reject) => {
176-
const childProcess = spawn(GRADLEW_FILE_PATH, args, { cwd: TITANIUM_ANDROID_PATH, stdio: 'inherit' });
176+
const childProcess = spawn(GRADLEW_FILE_PATH, args, {
177+
cwd: TITANIUM_ANDROID_PATH,
178+
shell: process.platform === 'win32',
179+
stdio: 'inherit'
180+
});
177181
childProcess.on('error', reject);
178182
childProcess.on('exit', (exitCode) => {
179183
if (exitCode === 0) {

build/lib/docs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ class Documentation {
2323
const outputFile = path.join(this.outputDir, filename);
2424

2525
return new Promise((resolve, reject) => {
26-
const prc = spawn(cmdPath, args, { cwd: DOC_DIR });
26+
const prc = spawn(cmdPath, args, {
27+
cwd: DOC_DIR,
28+
shell: process.platform === 'win32'
29+
});
2730
prc.stdout.on('data', data => console.log(data.toString().trim()));
2831
prc.stderr.on('data', data => console.error(data.toString().trim()));
2932
prc.on('close', code => {

0 commit comments

Comments
 (0)