Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* fix:lavas-project#179 bump to 2.2.9
  • Loading branch information
zoumiaojiang authored and easonyq committed Jul 18, 2018
1 parent 098029b commit 56d88ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/lavas-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lavas",
"version": "2.2.8",
"version": "2.2.9",
"description": "Lavas solution cli tool",
"main": "dist/index.js",
"files": [
Expand Down
6 changes: 3 additions & 3 deletions packages/lavas-cli/src/lib/scaffold/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ async function downloadFromGit(repo, targetPath, branchName) {

// 如果当前文件系统有 download 的缓存,就不重新 clone 了,将代码直接 pull 下来就好了。
if (fs.existsSync(targetPath) && fs.existsSync(path.resolve(targetPath, '.git'))) {
await exec(`${diskCommand}cd ${targetPath} && git checkout ${branchName} && git pull`);
await exec(`${diskCommand}cd "${targetPath}" && git checkout ${branchName} && git pull`);
}
else {
fs.existsSync(targetPath) && fs.removeSync(targetPath);
fs.mkdirsSync(targetPath);
await exec(`git clone ${repo} ${targetPath}`);
await exec(`${diskCommand}cd ${targetPath} && git checkout ${branchName}`);
await exec(`git clone ${repo} "${targetPath}"`);
await exec(`${diskCommand}cd "${targetPath}" && git checkout ${branchName}`);
}

return targetPath;
Expand Down

0 comments on commit 56d88ea

Please sign in to comment.