Skip to content

Commit

Permalink
复制过来的代码粘贴重了,删除重复代码
Browse files Browse the repository at this point in the history
  • Loading branch information
CC11001100 committed Jan 16, 2021
1 parent 9bbcb27 commit 1193996
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,25 +189,6 @@ function ensureDirectoryExists(directory) {
console.log(`mkdir ${directory}`);
}

function exists(path) {
try {
fs.statSync(path);
return true;
} catch (e) {
return e.message.indexOf("no such file or directory") === -1;
}
}

function ensureDirectoryExists(directory) {
// 如果指定的目录不存在的话则创建
if (exists(directory)) {
return;
}
shell.mkdir("-p", directory);
console.log(`mkdir ${directory}`);
}


function exists(path) {
try {
fs.statSync(path);
Expand Down

0 comments on commit 1193996

Please sign in to comment.