Skip to content

Commit

Permalink
Don't die if we try to "execute" a folder (fix #283)
Browse files Browse the repository at this point in the history
  • Loading branch information
vector-of-bool committed Dec 22, 2017
1 parent 275fa60 commit f84c715
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/kit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,11 @@ export async function scanDirForCompilerKits(dir: string, pr?: ProgressReporter)
return await kitIfCompiler(bin, pr);
} catch (e) {
log.warning('Failed to check binary', bin, 'by exception:', e);
// The binary may not be executable by this user...
if (e.code == 'EACCES') {
// The binary may not be executable by this user...
return null;
} else if (e.code == 'ENOENT') {
// This will happen on Windows if we try to "execute" a directory
return null;
}
throw e;
Expand Down

0 comments on commit f84c715

Please sign in to comment.