mirror of
https://github.com/elastic/kibana.git
synced 2025-04-18 23:21:39 -04:00
[dev/cli] ensure plugins/ and all watch source dirs exist (#78973)
Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
parent
189953299b
commit
b31b658274
2 changed files with 9 additions and 0 deletions
0
plugins/.empty
Normal file
0
plugins/.empty
Normal file
|
@ -19,6 +19,7 @@
|
|||
|
||||
import { resolve } from 'path';
|
||||
import { format as formatUrl } from 'url';
|
||||
import Fs from 'fs';
|
||||
|
||||
import opn from 'opn';
|
||||
import { REPO_ROOT } from '@kbn/utils';
|
||||
|
@ -233,6 +234,14 @@ export class ClusterManager {
|
|||
)
|
||||
);
|
||||
|
||||
for (const watchPath of watchPaths) {
|
||||
if (!Fs.existsSync(fromRoot(watchPath))) {
|
||||
throw new Error(
|
||||
`A watch directory [${watchPath}] does not exist, which will cause chokidar to fail. Either make sure the directory exists or remove it as a watch source in the ClusterManger`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const ignorePaths = [
|
||||
/[\\\/](\..*|node_modules|bower_components|target|public|__[a-z0-9_]+__|coverage)([\\\/]|$)/,
|
||||
/\.test\.(js|tsx?)$/,
|
||||
|
|
Loading…
Add table
Reference in a new issue