Skip to content

Commit 66fda89

Browse files
authored
Use fs.stat to check directory status (#880)
1 parent a20fbf7 commit 66fda89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/resources/plugin.utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ function assembleFiles(config, skipFiles=[]){
135135
let targetsPath;
136136

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

140-
if (extName.length !== 0) {
140+
if (!isDirectory) {
141141
targets = [ path.normalize(config.contractsDir) ];
142142
} else {
143143
targetsPath = path.join(config.contractsDir, '**', '*.{sol,vy}');

0 commit comments

Comments
 (0)