Skip to content

Commit

Permalink
Use fs.stat to check directory status (#880)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgewecke authored Apr 4, 2024
1 parent a20fbf7 commit 66fda89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/resources/plugin.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ function assembleFiles(config, skipFiles=[]){
let targetsPath;

// The targets (contractsDir) could actually be a single named file (OR a folder)
const extName = path.extname(config.contractsDir);
const isDirectory = fs.statSync(config.contractsDir).isDirectory();

if (extName.length !== 0) {
if (!isDirectory) {
targets = [ path.normalize(config.contractsDir) ];
} else {
targetsPath = path.join(config.contractsDir, '**', '*.{sol,vy}');
Expand Down

0 comments on commit 66fda89

Please sign in to comment.