CRITICAL: Unhandled Promise Rejection ERROR Bad substitution: ${}
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- javascript, node.js, shell
- 領域
- cli
調査の方向性
Start by reproducing the failure while testing web URLs in Command Code v1.66.0 on WSL, then inspect node_modules/shell-quote/parse.js around parseEnvVar and the classify, isReadonlyShellCommand, and shellPermissionRulesForCommand entry points shown in the stack. Done means the command completes with its expected result instead of producing an unhandled Promise rejection for Bad substitution: ${}.
索引モデルが issue の本文から書いたものです。
説明
Summary
Hi,
the cmdc cli unexpectedly stopped by below error:
ERROR Bad substitution: ${}
.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:157:12
154: if (char === '{') {
155: i += 1;
156: if (s.charAt(i) === '}') {
157: throw new Error('Bad substitution: ' + s.slice(i - 2, i + 1));
158: }
159: // match braces by depth so a nested `${` keeps its inner `}` from ending the outer substitution
160: var depth = 1;
- parseEnvVar (.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:157:12)
- (.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:256:17)
- at Array.map (<anonymous>)\t
- parseInternal (.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:113:17)
- parse (.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:309:15)
- classify (.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:2:400892)
- isReadonlyShellCommand (.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:2:406691)
- shellPermissionRulesForCommand (.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:2:1116296)
- getShellPermissionChoices (.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:2:1124280)
- ShellPermissionPrompt (.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:16:21508)
✖ CRITICAL: Unhandled Promise Rejection!
This is an unexpected error. Please file a bug report at https://github.com/CommandCodeAI/command-code/issues/new
✖ ERROR → Error
ℹ REASON → Bad substitution: ${}
ℹ ERROR STACK ↓
Error: Bad substitution: ${}
at parseEnvVar (/home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:157:12)
at /home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:256:17
at Array.map (<anonymous>)
at parseInternal (/home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:113:17)
at parse (/home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:309:15)
at classify (file:///home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:2:400892)
at isReadonlyShellCommand (file:///home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:2:406691)
at shellPermissionRulesForCommand (file:///home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:2:1116296)
at getShellPermissionChoices (file:///home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:2:1124280)
at ShellPermissionPrompt (file:///home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:16:21508)
ℹ Trace ID: 25b5e46aee64eda322ee6bd2eef4fe44
Share this ID with support to help debug your issue.
Expected Behavior
Complete the cmd and give expected result. But stopped by ✖ CRITICAL: Unhandled Promise Rejection!
Actual Behavior
✖ CRITICAL: Unhandled Promise Rejection!
This is an unexpected error. Please file a bug report at https://github.com/CommandCodeAI/command-code/issues/new
✖ ERROR → Error
ℹ REASON → Bad substitution: ${}
ℹ ERROR STACK ↓
Error: Bad substitution: ${}
at parseEnvVar (/home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:157:12)
at /home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:256:17
at Array.map (<anonymous>)
at parseInternal (/home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:113:17)
at parse (/home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/node_modules/shell-quote/parse.js:309:15)
at classify (file:///home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:2:400892)
at isReadonlyShellCommand (file:///home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:2:406691)
at shellPermissionRulesForCommand (file:///home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:2:1116296)
at getShellPermissionChoices (file:///home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:2:1124280)
at ShellPermissionPrompt (file:///home/bug/.nvm/versions/node/v24.18.0/lib/node_modules/command-code/dist/cli.mjs:16:21508)
Steps to reproduce the issue
- I try to: use all skills one by one and find vulnerabilities on this https://readact.com site
- cmdc crushed while testing web URLs.
Command Code Version
v1.66.0
Operating System
Linux
Terminal/IDE
wsl
Shell
wsl
Session file (optional)
No response
Fix prompt (optional)
No response
Additional context
No response
- 主要言語
- 言語のデータがありません
- スター
- 4k
- フォーク
- 357
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CommandCodeAI/command-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CommandCodeAI/command-code#933 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CommandCodeAI/command-code#855 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
CommandCodeAI/command-code#841 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CommandCodeAI/command-code#655 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CommandCodeAI/command-code#608 ·
CommandCodeAI/command-code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
objectionary/eolang.sty#167 ·
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
githubnext/gh-aw-workshop#3968 ·
メンテナーはふだん 1 日以内に返信
-
triage/confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
agentscope-ai/agentscope#2987 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
HexRaysSA/ida-hcli#368 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
chore tests
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信