Skip to content

Commit

Permalink
revert changes. fails on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Oct 14, 2020
1 parent 635546e commit 9a1205d
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions packages/kbn-optimizer/src/optimizer/optimizer_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import Path from 'path';
import Os from 'os';
import { getPluginSearchPaths } from '@kbn/dev-utils';

import {
Bundle,
Expand Down Expand Up @@ -160,13 +159,19 @@ export class OptimizerConfig {
throw new TypeError('outputRoot must be an absolute path');
}

const pluginScanDirs =
options.pluginScanDirs ||
getPluginSearchPaths({
rootDir: repoRoot,
oss,
examples,
});
/**
* BEWARE: this needs to stay roughly synchronized with
* `src/core/server/config/env.ts` which determines which paths
* should be searched for plugins to load
*/
const pluginScanDirs = options.pluginScanDirs || [
Path.resolve(repoRoot, 'src/plugins'),
...(oss ? [] : [Path.resolve(repoRoot, 'x-pack/plugins')]),
Path.resolve(repoRoot, 'plugins'),
...(examples ? [Path.resolve('examples')] : []),
...(examples && !oss ? [Path.resolve('x-pack/examples')] : []),
Path.resolve(repoRoot, '../kibana-extra'),
];

if (!pluginScanDirs.every((p) => Path.isAbsolute(p))) {
throw new TypeError('pluginScanDirs must all be absolute paths');
Expand Down

0 comments on commit 9a1205d

Please sign in to comment.