Skip to content

Commit

Permalink
Correct CLI path in ./bin/kibana. Copy yargs config node from `pack…
Browse files Browse the repository at this point in the history
…age.json` during build.
  • Loading branch information
azasypkin committed Jul 31, 2018
1 parent 6b4b7e6 commit bd4fadc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bin/kibana
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ if [ ! -x "$NODE" ]; then
exit 1
fi

NODE_ENV=production exec "${NODE}" $NODE_OPTIONS --no-warnings "${DIR}/src/cli" ${@}

NODE_ENV=production exec "${NODE}" $NODE_OPTIONS --no-warnings "${DIR}/src/core/cli" ${@}
2 changes: 1 addition & 1 deletion bin/kibana.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If Not Exist "%NODE%" (
)

TITLE Kibana Server
"%NODE%" %NODE_OPTIONS% --no-warnings "%DIR%\src\cli" %*
"%NODE%" %NODE_OPTIONS% --no-warnings "%DIR%\src\core\cli" %*

:finally

Expand Down
4 changes: 2 additions & 2 deletions src/core/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Specify --help for available options

export const parseArgv = (argv: string[]): Arguments => {
return yargs(argv)
.usage(args.usage + '\n\n' + args.description)
.usage(`${args.usage}\n\n${args.description}`)
.scriptName('')
.version()
.alias('h', 'help')
Expand All @@ -55,7 +55,7 @@ export const run = () => {
const argv = process.env.kbnWorkerArgv ? JSON.parse(process.env.kbnWorkerArgv) : process.argv;

const cliArgs = parseArgv(argv.slice(2));
if (cliArgs._[0]) {
if (cliArgs._.length > 0) {
onCliError(`unknown command ${cliArgs._[0]}`);
}
};
Expand Down
1 change: 1 addition & 0 deletions src/dev/build/tasks/create_package_json_task.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const CreatePackageJsonTask = {
node: pkg.engines.node,
},
dependencies: transformDependencies(pkg.dependencies),
yargs: pkg.yargs,
};

if (build.isOss()) {
Expand Down

0 comments on commit bd4fadc

Please sign in to comment.