Skip to content

Commit

Permalink
refactor: move repositories warn
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Jan 11, 2020
1 parent 2255d4a commit a544032
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions lib/workers/global/autodiscover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export async function autodiscoverRepositories(
config: RenovateConfig
): Promise<RenovateConfig> {
if (!config.autodiscover) {
if (!(config.repositories && config.repositories.length)) {
logger.warn(
'No repositories found - did you want to run with flag --autodiscover?'
);
}
return config;
}
// Autodiscover list of repositories
Expand Down
5 changes: 0 additions & 5 deletions lib/workers/global/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ export async function start(): Promise<0 | 1> {
config = await setDirectories(config);
config = await autodiscoverRepositories(config);
cache.init(config.cacheDir);
if (config.repositories.length === 0) {
logger.warn(
'No repositories found - did you want to run with flag --autodiscover?'
);
}
// Move global variables that we need to use later
const importGlobals = ['prBanner', 'prFooter'];
config.global = {};
Expand Down

0 comments on commit a544032

Please sign in to comment.