Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

CRITICAL: Unhandled Promise Rejection ERROR Bad substitution: ${}

オープン
#934 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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
  1. I try to: use all skills one by one and find vulnerabilities on this https://readact.com site
  2. 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CommandCodeAI/command-code のほかの issue

CommandCodeAI/command-code の issue をすべて見る

似ている issue

CLI の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。