message: Don't try to stat a possibly-non-existent file. [Fix
diff: * Module for controlling and working with Kits.
  */ /** */
  +import rollbar from '@cmt/rollbar';
  import * as json5 from 'json5';
  import * as path from 'path';
  import * as vscode from 'vscode';
  @@ -274,6 +275,16 @@ 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);
  + 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;
  + } else if (e.code == 'UNKNOWN' && process.platform == 'win32') {
  + // This is when file is not executable (in windows)
  + return null;
  + }
  const stat = await fs.stat(bin);
  log.debug('File infos: ',
  'Mode',
  @@ -284,17 +295,8 @@ export async function scanDirForCompilerKits(dir: string, pr?: ProgressReporter)
  stat.isDirectory(),
  'isSymbolicLink',
  stat.isSymbolicLink());
  - 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
  + rollbar.exception('Failed to scan a kit file', e, {bin, exception: e.code, stat});
  return null;
  - } else if (e.code == 'UNKNOWN' && process.platform == 'win32') {
  - // This is when file is not executable (in windows)
  - return null;
  - }
  - throw e;
  }
  });
  log.debug('Found', kits.length, 'kits in directory', dir);
  