• Get the SFDX config data for the specified folder path by traversing down the folder tree until an SFDX config file is found that contains a default username. Returns the default username and the path to the config file.

    By default the search is limited to 2 levels down from the initial folder path specified, this can be changed by specifying a different limit in the options.

    Returns undefined if no config file with a default username is found.

    Parameters

    • folderPath: string

      Folder path to start the search from

    • options: {
          fs: FileSystem;
          limit?: number;
      } = ...

      Options for the search

      • fs: FileSystem
      • Optional limit?: number

    Returns Promise<{
        config: SfdxConfig;
        path: string;
    } | undefined>

    The default username and the path to the config file from which it was loaded