Fix issue in util.setExecutableBit

pull/14086/head
Alex Dima 2016-10-20 15:30:53 +02:00
parent 05c0eee675
commit d7930ec63d
3 changed files with 16 additions and 9 deletions

View File

@ -73,11 +73,11 @@ function setExecutableBit(pattern) {
return setBit;
}
var input = es.through();
var _filter = _filter(pattern, { restore: true });
var filter = _filter(pattern, { restore: true });
var output = input
.pipe(_filter)
.pipe(filter)
.pipe(setBit)
.pipe(_filter.restore);
.pipe(filter.restore);
return es.duplex(input, output);
}
exports.setExecutableBit = setExecutableBit;

View File

@ -102,11 +102,11 @@ export function setExecutableBit(pattern: string | string[]): NodeJS.ReadWriteSt
}
var input = es.through();
var _filter = _filter(pattern, { restore: true });
var filter = _filter(pattern, { restore: true });
var output = input
.pipe(_filter)
.pipe(filter)
.pipe(setBit)
.pipe(_filter.restore);
.pipe(filter.restore);
return es.duplex(input, output);
}

View File

@ -38,6 +38,15 @@ gulp.task('compile-build', ['compile-client-build', 'compile-extensions-build'])
gulp.task('watch-build', ['watch-client-build', 'watch-extensions-build']);
var ALL_EDITOR_TASKS = [
// Always defined tasks
'clean-client',
'compile-client',
'watch-client',
'clean-client-build',
'compile-client-build',
'watch-client-build',
// Editor tasks (defined in gulpfile.editor)
'clean-optimized-editor',
'optimize-editor',
'clean-minified-editor',
@ -46,9 +55,7 @@ var ALL_EDITOR_TASKS = [
'editor-distro',
'analyze-editor-distro'
];
var runningEditorTasks = process.argv.slice(2).every(function(arg) {
return (ALL_EDITOR_TASKS.indexOf(arg) !== -1);
});
var runningEditorTasks = process.argv.length > 2 && process.argv.slice(2).every(function(arg) { return (ALL_EDITOR_TASKS.indexOf(arg) !== -1); });
if (runningEditorTasks) {
require(`./build/gulpfile.editor`);