[8.8] [Windows] Fix string comparison in bat scripts for default dir. (#158517) (#158595)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Windows] Fix string comparison in bat scripts for default dir.
(#158517)](https://github.com/elastic/kibana/pull/158517)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Brad
White","email":"Ikuni17@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-05-26T16:26:56Z","message":"[Windows]
Fix string comparison in bat scripts for default dir. (#158517)\n\n##
Summary\r\n \r\nFixes #137477\r\n\r\nThe `node.options` file was not
being found if `KBN_PATH_CONF` was not\r\nset because the default
directory fallback condition was failing.\r\n\r\n`kibana.bat` before
fix, can see the flag I added in\r\n`config/node.options` is missing and
default options are
used:\r\n\r\n\r\n![broken](178f75a5-f3ec-4785-bd7c-aa609e43b786)\r\n\r\n\r\nThe
flag is correctly added after
fix:\r\n\r\n\r\n![fixed](f607a7b3-cc04-40ea-9608-db6466b0333f)\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7655cb9e9e1c6da0266abec65f5c1399983bb252","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","ci:build-all-platforms","backport:prev-MAJOR","v8.9.0"],"number":158517,"url":"https://github.com/elastic/kibana/pull/158517","mergeCommit":{"message":"[Windows]
Fix string comparison in bat scripts for default dir. (#158517)\n\n##
Summary\r\n \r\nFixes #137477\r\n\r\nThe `node.options` file was not
being found if `KBN_PATH_CONF` was not\r\nset because the default
directory fallback condition was failing.\r\n\r\n`kibana.bat` before
fix, can see the flag I added in\r\n`config/node.options` is missing and
default options are
used:\r\n\r\n\r\n![broken](178f75a5-f3ec-4785-bd7c-aa609e43b786)\r\n\r\n\r\nThe
flag is correctly added after
fix:\r\n\r\n\r\n![fixed](f607a7b3-cc04-40ea-9608-db6466b0333f)\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7655cb9e9e1c6da0266abec65f5c1399983bb252"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/158517","number":158517,"mergeCommit":{"message":"[Windows]
Fix string comparison in bat scripts for default dir. (#158517)\n\n##
Summary\r\n \r\nFixes #137477\r\n\r\nThe `node.options` file was not
being found if `KBN_PATH_CONF` was not\r\nset because the default
directory fallback condition was failing.\r\n\r\n`kibana.bat` before
fix, can see the flag I added in\r\n`config/node.options` is missing and
default options are
used:\r\n\r\n\r\n![broken](178f75a5-f3ec-4785-bd7c-aa609e43b786)\r\n\r\n\r\nThe
flag is correctly added after
fix:\r\n\r\n\r\n![fixed](f607a7b3-cc04-40ea-9608-db6466b0333f)\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7655cb9e9e1c6da0266abec65f5c1399983bb252"}}]}]
BACKPORT-->

Co-authored-by: Brad White <Ikuni17@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2023-05-26 15:08:26 -04:00 committed by GitHub
parent 35f824ab1f
commit a47810d7c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 7 deletions

View file

@ -14,7 +14,7 @@ If Not Exist "%NODE%" (
)
set CONFIG_DIR=%KBN_PATH_CONF%
If ["%KBN_PATH_CONF%"] == [] (
If ["%KBN_PATH_CONF%"] == [""] (
set "CONFIG_DIR=%DIR%\config"
)

View file

@ -14,7 +14,7 @@ If Not Exist "%NODE%" (
)
set CONFIG_DIR=%KBN_PATH_CONF%
If ["%KBN_PATH_CONF%"] == [] (
If ["%KBN_PATH_CONF%"] == [""] (
set "CONFIG_DIR=%DIR%\config"
)

View file

@ -14,7 +14,7 @@ If Not Exist "%NODE%" (
)
set CONFIG_DIR=%KBN_PATH_CONF%
If ["%KBN_PATH_CONF%"] == [] (
If ["%KBN_PATH_CONF%"] == [""] (
set "CONFIG_DIR=%DIR%\config"
)

View file

@ -14,7 +14,7 @@ If Not Exist "%NODE%" (
)
set CONFIG_DIR=%KBN_PATH_CONF%
If ["%KBN_PATH_CONF%"] == [] (
If ["%KBN_PATH_CONF%"] == [""] (
set "CONFIG_DIR=%DIR%\config"
)

View file

@ -14,7 +14,7 @@ If Not Exist "%NODE%" (
)
set CONFIG_DIR=%KBN_PATH_CONF%
If ["%KBN_PATH_CONF%"] == [] (
If ["%KBN_PATH_CONF%"] == [""] (
set "CONFIG_DIR=%DIR%\config"
)

View file

@ -14,7 +14,7 @@ If Not Exist "%NODE%" (
)
set CONFIG_DIR=%KBN_PATH_CONF%
If ["%KBN_PATH_CONF%"] == [] (
If ["%KBN_PATH_CONF%"] == [""] (
set "CONFIG_DIR=%DIR%\config"
)

View file

@ -14,7 +14,7 @@ If Not Exist "%NODE%" (
)
set CONFIG_DIR=%KBN_PATH_CONF%
If ["%KBN_PATH_CONF%"] == [] (
If ["%KBN_PATH_CONF%"] == [""] (
set "CONFIG_DIR=%DIR%\config"
)