message: fix configuration for try-require
diff: *--------------------------------------------------------------------------------------------*/
  import { exists, filePath } from '@microsoft.azure/async-io';
  -import { clone } from '@microsoft.azure/linq';
  import { BlameTree, DataHandle, DataStore, IFileSystem, LazyPromise, ParseToAst, RealFileSystem, safeEval, Stringify, stringify, TryDecodeEnhancedPositionFromName } from '@microsoft.azure/datastore';
  import { Extension, ExtensionManager, LocalExtension } from '@microsoft.azure/extension';
  +import { clone } from '@microsoft.azure/linq';
  import { CreateFileUri, CreateFolderUri, EnsureIsFolderUri, ExistsUri, ResolveUri } from '@microsoft.azure/uri';
  import { From } from 'linq-es2015';
  import { basename, dirname, join } from 'path';
  @@ -78,10 +78,9 @@ export interface AutoRestConfigurationImpl {
  'debugger'?: any;
  }
  -
  export function MergeConfigurations(...configs: Array<AutoRestConfigurationImpl>): AutoRestConfigurationImpl {
  let result: AutoRestConfigurationImpl = {};
  - configs = configs.map((each, i, a) => ({ ...each, 'load-priority': each['load-priority'] || -i })).sort((a, b) => (<number>b['load-priority']) - (<number>a['load-priority']));
  + configs = configs.map((each, i, a) => ({ ...each, 'load-priority': each['load-priority'] || -i })).sort((a, b) => (b['load-priority']) - (a['load-priority']));
  for (const config of configs) {
  result = MergeConfiguration(result, config);
  @@ -153,10 +152,9 @@ function arrayOf<T>(value: any): Array<T> {
  }
  break;
  }
  - return [<T><any>value];
  + return [<T>value];
  }
  -
  export interface Directive {
  from?: Array<string> | string;
  where?: Array<string> | string;
  @@ -171,7 +169,7 @@ export interface Directive {
  export class StaticDirectiveView {
  from: Array<string>;
  - where: Array<string>
  + where: Array<string>;
  reason?: string;
  suppress: Array<string>;
  transform: Array<string>;
  @@ -187,7 +185,6 @@ export class StaticDirectiveView {
  }
  }
  -
  export class DirectiveView {
  constructor(private directive: Directive) {
  @@ -410,12 +407,13 @@ export class ConfigurationView {
  // looks like we found one that we haven't handled yet.
  done = false;
  - ignoreFiles.add(each)
  + ignoreFiles.add(each);
  yield view.ResolveAsPath(each);
  break;
  }
  }
  + done = false;
  while (!done) {
  // get a fresh copy of the view every time we start the loop.
  const view = configView();
  @@ -431,9 +429,14 @@ export class ConfigurationView {
  done = false;
  ignoreFiles.add(each);
  const path = view.ResolveAsPath(each);
  + try {
  if (await fileSystem.ReadFile(path)) {
  yield path;
  }
  + } catch {
  + // do nothing
  + }
  +
  break;
  }
  @@ -829,7 +832,7 @@ export class Configuration {
  const segs = await this.desugarRawConfigs(configs);
  configSegments.push(...segs);
  if (keepInSecondPass) {
  - secondPass.push(...segs)
  + secondPass.push(...segs);
  }
  return segs;
  };
  @@ -1004,7 +1007,6 @@ export class Configuration {
  }
  }
  -
  }
  // re-acquire CLI and configuration files at a lower priority
  // this enables the configuration of a plugin to specify stuff like `enable-multi-api`
  