You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem occurs because the child gulp script requires working directory change:
gulp --gulpfile "<...>\gulpfile.js" build [13:40:01] Working directory changed to <...>
[13:40:03] Using gulpfile <...>\gulpfile.js
[13:40:03] Starting 'build'...
[13:40:03] Finished 'build' after 6.42 μs
This works:
const cp = require('cp');
gulp.task('gg2', function (done) {
var gulpfile = path.join(gulpcwd, 'gulpfile.js');
var subShell = cp.spawn('cmd.exe', ['/C', 'gulp', '--gulpfile', gulpfile, '--cwd', gulpcwd, 'build'], {
env: process.env,
cwd: process.cwd()
});
subShell.stdout.pipe(process.stdout);
subShell.stderr.pipe(process.stderr);
subShell.once('exit', function (code) {
done(code);
});
});
The problem occurs because the child gulp script requires working directory change:
gulp --gulpfile "<...>\gulpfile.js" build
[13:40:01] Working directory changed to <...>
[13:40:03] Using gulpfile <...>\gulpfile.js
[13:40:03] Starting 'build'...
[13:40:03] Finished 'build' after 6.42 μs
This works:
This doesn’t work:
In latter case the child process sends a standard gulp error that the gulp file is not found.
The text was updated successfully, but these errors were encountered: