Skip to content

Commit

Permalink
Merge pull request #6954 from elastic/fix/dontRequireDevConfig
Browse files Browse the repository at this point in the history
[cli/serve] do not require dev.yml file when run with --dev flag
  • Loading branch information
epixa committed Apr 18, 2016
2 parents 85ebbe5 + 9fa56cc commit 7d08096
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/cli/serve/serve.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import _ from 'lodash';
import { statSync } from 'fs';
import { isWorker } from 'cluster';
import { resolve } from 'path';

Expand Down Expand Up @@ -117,7 +118,14 @@ module.exports = function (program) {
command
.action(async function (opts) {
if (opts.dev) {
opts.config.push(fromRoot('config/kibana.dev.yml'));
try {
const kbnDevConfig = fromRoot('config/kibana.dev.yml');
if (statSync(kbnDevConfig).isFile()) {
opts.config.push(kbnDevConfig);
}
} catch (err) {
// ignore, kibana.dev.yml does not exist
}
}

const settings = initServerSettings(opts, this.getUnknownOptions());
Expand Down

0 comments on commit 7d08096

Please sign in to comment.