Skip to content

Commit

Permalink
fix: 修复pupptter安装目录检测不正确的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Oct 29, 2017
1 parent 16b6efd commit 615b464
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ try {
if (files.length <= 0) {
throw null;
}

const firstFile = files[0];

const firstFileStat = fs.statSync(path.join(localChromiumPath, firstFile));

// 不是目录
if (!firstFileStat.isDirectory()) {
throw null;
}
} catch (err) {
if (err) {
console.error(err);
Expand Down

0 comments on commit 615b464

Please sign in to comment.