Skip to content

Commit

Permalink
[cli] Add kibana-encryption-keys.bat (#102070)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
jbudz and kibanamachine authored Jun 23, 2021
1 parent a6bef93 commit 38be1d0
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/dev/build/tasks/bin/scripts/kibana-encryption-keys.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@echo off

SETLOCAL ENABLEDELAYEDEXPANSION

set SCRIPT_DIR=%~dp0
for %%I in ("%SCRIPT_DIR%..") do set DIR=%%~dpfI

set NODE=%DIR%\node\node.exe

If Not Exist "%NODE%" (
Echo unable to find usable node.js executable.
Exit /B 1
)

set CONFIG_DIR=%KBN_PATH_CONF%
If [%KBN_PATH_CONF%] == [] (
set "CONFIG_DIR=%DIR%\config"
)

IF EXIST "%CONFIG_DIR%\node.options" (
for /F "usebackq eol=# tokens=*" %%i in ("%CONFIG_DIR%\node.options") do (
If [!NODE_OPTIONS!] == [] (
set "NODE_OPTIONS=%%i"
) Else (
set "NODE_OPTIONS=!NODE_OPTIONS! %%i"
)
)
)

TITLE Kibana Encryption Keys
"%NODE%" "%DIR%\src\cli_encryption_keys\dist" %*

:finally

ENDLOCAL

0 comments on commit 38be1d0

Please sign in to comment.