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

+5-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@ class Android {
173173

174174
asyncfunctiongradlew(args){
175175
awaitnewPromise((resolve,reject)=>{
176-
constchildProcess=spawn(GRADLEW_FILE_PATH,args,{cwd: TITANIUM_ANDROID_PATH,stdio: 'inherit'});
176+
constchildProcess=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

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ class Documentation {
2323
constoutputFile=path.join(this.outputDir,filename);
2424

2525
returnnewPromise((resolve,reject)=>{
26-
constprc=spawn(cmdPath,args,{cwd: DOC_DIR});
26+
constprc=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)
close