[6.x] [canvas/gulp-scripts] replace script path in argv with gulp path (#25352) (#25354)

Backports the following commits to 6.x:
 - [canvas/gulp-scripts] replace script path in argv with gulp path  (#25352)
This commit is contained in:
Spencer 2018-11-07 16:40:29 -08:00 committed by GitHub
parent 0b449f34d8
commit f754cf8019
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ const { resolve } = require('path');
exports.runGulpTask = function(name) {
process.chdir(resolve(__dirname, '../../..'));
process.argv.splice(2, 0, name);
process.argv.splice(1, 1, require.resolve('gulp/bin/gulp'), name);
require('gulp/bin/gulp');
};