Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit f3cf619

Browse files
committed
- resolved issue with windows path containing spaces
1 parent cbabe4d commit f3cf619

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tasks/setup.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,17 @@ module.exports = function (grunt) {
6464

6565
function unzip(src, dest) {
6666
grunt.verbose.writeln("Extracting " + src);
67-
return exec("unzip -q " + src + " -d " + dest);
67+
return exec("unzip -q \"" + src + "\" -d \"" + dest + "\"");
6868
}
6969

7070
function curl(src, dest) {
71-
grunt.verbose.writeln("Downloading " + src);
72-
return exec("curl -o " + dest + " " + src);
71+
if (process.platform === "win32") {
72+
var dest = dest.replace(/\\/g, "/");
73+
}
74+
75+
grunt.verbose.writeln("Downloading " + src + " to " + dest);
76+
var cmd = "curl -o \"" + dest + "\" \"" + src + "\"";
77+
return exec(cmd);
7378
}
7479

7580
// task: cef
@@ -144,6 +149,9 @@ module.exports = function (grunt) {
144149
downloadSourceURLS.push(downloadSource);
145150
}
146151

152+
// ensure the download directory exists
153+
fs.mkdirSync(downloadDest);
154+
147155
var promises = downloadSourceURLS.map(function (srcUrl) {
148156
var filename = path.basename(srcUrl),
149157
dest = path.join(downloadDest, filename);

0 commit comments

Comments
 (0)