kibana/bin/kibana.bat
Joe Fleming 4d9ddacd76 add errorlevel check to where command
check the error level before trying to use global node install

Fixes #5617
2015-12-09 20:01:33 +00:00

30 lines
464 B
Batchfile

@echo off
SETLOCAL
set SCRIPT_DIR=%~dp0
for %%I in ("%SCRIPT_DIR%..") do set DIR=%%~dpfI
set NODE=%DIR%\node\node.exe
WHERE /Q node
IF %ERRORLEVEL% EQU 0 (
for /f "delims=" %%i in ('WHERE node') do set SYS_NODE=%%i
)
If Not Exist "%NODE%" (
IF Exist "%SYS_NODE%" (
set NODE=%SYS_NODE%
) else (
Echo unable to find usable node.js executable.
Exit /B 1
)
)
TITLE Kibana Server
"%NODE%" %NODE_OPTIONS% "%DIR%\src\cli" %*
:finally
ENDLOCAL