Fix gulp global path for tasks and remove quotes in favor of community PR

This commit is contained in:
Alex Ross
2019-02-12 15:57:58 +01:00
parent 85eaaf4ad8
commit 810a54ddef

View File

@@ -120,7 +120,7 @@ class FolderDetector {
let gulpCommand: string;
let platform = process.platform;
if (platform === 'win32' && await exists(path.join(rootPath!, 'node_modules', '.bin', 'gulp.cmd'))) {
const globalGulp = path.join(process.env.APPDATA ? process.env.APPDATA : '', 'npm - Copy', 'gulp.cmd');
const globalGulp = path.join(process.env.APPDATA ? process.env.APPDATA : '', 'npm', 'gulp.cmd');
if (await exists(globalGulp)) {
gulpCommand = globalGulp;
} else {
@@ -132,7 +132,7 @@ class FolderDetector {
gulpCommand = 'gulp';
}
let commandLine = `\"${gulpCommand}\" --tasks-simple --no-color`;
let commandLine = `${gulpCommand} --tasks-simple --no-color`;
try {
let { stdout, stderr } = await exec(commandLine, { cwd: rootPath });
if (stderr && stderr.length > 0) {