Skip to content

Commit

Permalink
address some review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Apr 5, 2021
1 parent 315a8b2 commit 69a9d8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,6 @@ module.exports = {
'!src/core/server/mocks{,.ts}',
'!src/core/server/types{,.ts}',
'!src/core/server/test_utils{,.ts}',
'!src/core/server/utils', // ts alias
'!src/core/server/utils/**/*',
// for absolute imports until fixed in
// https://github.com/elastic/kibana/issues/36096
'!src/core/server/*.test.mocks{,.ts}',
Expand Down
5 changes: 3 additions & 2 deletions packages/kbn-utils/src/package_json/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ export const kibanaPackageJson = {
...require(resolve(REPO_ROOT, 'package.json')),
};

export const IS_KIBANA_DISTRIBUTABLE =
kibanaPackageJson.build && kibanaPackageJson.build.distributable === true;
export const isKibanaDistributable = () => {
return kibanaPackageJson.build && kibanaPackageJson.build.distributable === true;
};
4 changes: 2 additions & 2 deletions src/cli/serve/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { statSync } from 'fs';
import { resolve } from 'path';
import url from 'url';

import { getConfigPath, fromRoot, IS_KIBANA_DISTRIBUTABLE } from '@kbn/utils';
import { getConfigPath, fromRoot, isKibanaDistributable } from '@kbn/utils';
import { readKeystore } from '../keystore/read_keystore';

function canRequire(path) {
Expand Down Expand Up @@ -184,7 +184,7 @@ export default function (program) {
.option('--plugins <path>', 'an alias for --plugin-dir', pluginDirCollector)
.option('--optimize', 'Deprecated, running the optimizer is no longer required');

if (!IS_KIBANA_DISTRIBUTABLE) {
if (!isKibanaDistributable()) {
command
.option('--oss', 'Start Kibana without X-Pack')
.option(
Expand Down

0 comments on commit 69a9d8c

Please sign in to comment.