Skip to content

Commit 3b648e4

Browse files
committed
fixed yarn/grunt/npm paths
1 parent 5405036 commit 3b648e4

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

singlefile.ls

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ run_npm = (script,cb)->
3333
fs.writeFile path.join(scriptdir, 'package.json'), JSON.stringify(script.npm), (err)->
3434
if err
3535
return cb err
36-
child_process.exec 'yarn', (err, stdout, stderr)->
37-
if err
38-
return cb err
39-
return cb void
36+
child_process.exec 'npm', {cwd:scriptdir}, (err, stdout, stderr)->
37+
return cb err
4038
return
4139
else
4240
return cb 'no pkg'
@@ -46,10 +44,8 @@ run_yarn = (script,cb)->
4644
fs.writeFile path.join(scriptdir, 'package.json'), JSON.stringify(script.yarn), (err)->
4745
if err
4846
return cb err
49-
child_process.exec 'yarn', (err, stdout, stderr)->
50-
if err
51-
return cb err
52-
return cb void
47+
child_process.exec 'yarn', {cwd:scriptdir}, (err, stdout, stderr)->
48+
return cb err
5349
return
5450
else
5551
return cb 'no pkg'
@@ -59,8 +55,8 @@ run_grunt = (script,cb)->
5955
fs.writeFile path.join(scriptdir,'Gruntfile.js'), JSON.stringify(script.grunt), (err)->
6056
if err
6157
return cb err
62-
err, stdout, stderr <- child_process.exec 'grunt'
63-
return cb err
58+
child_process.exec 'grunt', (err, stdout, stderr)->
59+
return cb err
6460
return
6561
else
6662
return cb 'no grunt'

0 commit comments

Comments
 (0)