[BUG] JAVA_OPTS is incorrectly evaluated
@kay-schecker がすでに取り組んでいます。
2026年6月2日 から。
評価
この issue はまだ評価されていません。
説明
🐛 Bug Report:
Describe the bug
The content of the environment variable JAVA_OPTS is evaluated. In case it contains a | character, then the next part of it is interpreted as a new command.
I'm in a corporate network that is secured by a proxy. My JAVA_OPTS environment variable defines the settings so that Java can use the proxy:
$ env | grep JAVA_OPTS
JAVA_OPTS=-Dhttp.proxyHost=localhost -Dhttp.proxyPort=9000 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=9000 -Dhttp.nonProxyHosts=127.*|localhost|*.local
$
The http.nonProxyHosts contains the | character as described by Java. The normal Java applications accept this environment variable correctly.
Steps to Reproduce
Steps to reproduce the behavior:
- Go to en empty directory.
- Install the cli:
npm install -g @openapitools/openapi-generator-cli - Call the generator without a
|in theJAVA_OPTS:
JAVA_OPTS="-Dhttp.nonProxyHosts=localhost" openapi-generator-cli help - Call the generator with a
|in theJAVA_OPTS:
JAVA_OPTS="-Dhttp.nonProxyHosts=127.*|localhost" openapi-generator-cli help
Actuall response
The command from point 4. returns the error message:
Error: 'localhost' is not recognized as an internal or external command,
operable program or batch file.
at C:\Users\S230984\AppData\Local\nvm\v22.22.3\node_modules\@openapitools\openapi-generator-cli\main.js:2:51423
at ChildProcess.exithandler (node:child_process:424:5)
at ChildProcess.emit (node:events:519:28)
at maybeClose (node:internal/child_process:1101:16)
at ChildProcess._handle.onexit (node:internal/child_process:304:5)
Node.js v22.22.3
Expected behavior
The command from point 3. returns a correct help response. The command from point 4. should return the same response.
Screenshots
N/A
Operation System (please complete the following information):
- OS: Windows with a git-bash
- Version 11
Package System (please complete the following information):
- Version: Node.js 22
Additional context
I expect that the problem is that the java command with paramaters is evaluated too much. There are somewhere quotes missing. During the evaluation, the | character is then interpreted by the shell as a command pipe end the next part is expected to be a command (which it isn't). Additional quotes inside my environment variable is not needed. The normal shell doesn't automatically evaluate the content as a pipe. The following command (without additional quotes) returns the correct output:
$ echo $JAVA_OPTS
-Dhttp.proxyHost=localhost -Dhttp.proxyPort=9000 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=9000 -Dhttp.nonProxyHosts=127.*|localhost|*.local
$
- 主要言語
- TypeScript
- スター
- 2k
- フォーク
- 208
- 平均マージ
- 7時間 12分
- マージ済み PR(30日)
- 6
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenAPITools/openapi-generator-cli のほかの issue
-
[FEATURE] consider using caret ranges instead of pinned exact versions for runtime dependencies オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
bug
OpenAPITools/openapi-generator-cli#1190 · 担当者 1 名 ·
-
bug
OpenAPITools/openapi-generator-cli#1138 · コメント 1 件 · 担当者 1 名 ·
-
bug
OpenAPITools/openapi-generator-cli#1094 · コメント 1 件 · 担当者 1 名 ·
-
bug
OpenAPITools/openapi-generator-cli#991 · 担当者 1 名 ·
OpenAPITools/openapi-generator-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/claude-code#96687 ·
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
AOSSIE-Org/DebateAI#582 · コメント 2 件 ·