Skip to content

fix(v3.2.55): start.bat を pure ASCII 化 — cmd.exe parse エラー修正 - #211

Merged
Kensan196948G merged 1 commit into
mainfrom
fix/v3.2.55-start-bat-ascii
Apr 20, 2026
Merged

Kensan196948G merged 1 commit into
mainfrom
fix/v3.2.55-start-bat-ascii

Conversation

@Kensan196948G

@Kensan196948G Kensan196948G commented Apr 20, 2026 •

Copy link
Copy Markdown
Owner

v3.2.42 で追加した日本語コメントが CP932 ロケール cmd.exe で mis-decode され、'not was unexpected at this time.' exit 255 エラーが発生していた。英語コメントに置換し pure ASCII 化して解消。

Summary by CodeRabbit

リリースノート

  • その他の更新
    • 内部ドキュメンテーションの表記を更新しました。

このリリースには、エンドユーザーに対する機能変更や改善はありません。

## 問題

v3.2.42 で追加した start.bat は UTF-8 (BOM なし) で保存され、日本語コメント:

```batch
rem PowerShell 7 (pwsh) を優先。PATH 不通でも既知インストール先を検査する。
```

を含んでいた。Windows 日本語ロケールの cmd.exe は .bat を CP932 (Shift-JIS) で
解釈するため、UTF-8 の「を」「優先」等のバイト列を mis-decode し、その結果
後続の if 節で「not was unexpected at this time.」エラー (exit 255) が発生。

## 修正

日本語コメントを英語に置換し、pure ASCII 化:

```batch
rem Prefer PowerShell 7 (pwsh). Check known install paths when PATH lookup fails.
```

## 検証

- ASCII only 確認: `[regex]::IsMatch(text, '[^\x00-\x7F]')` が false
- cmd.exe による parse 通過 (エラー出力なし)

## 教訓

.bat は cmd.exe のロケール依存なので日本語コメント入れ禁止とする。メッセージを
日本語出したい場合は `chcp 65001` 後に PowerShell から `Write-Host` する。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 20, 2026 02:37
@coderabbitai

coderabbitai Bot commented Apr 20, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6294ca27-a394-4f3e-a471-808e28c7379e

📥 Commits

Reviewing files that changed from the base of the PR and between 5b15d76 and 758dcb6.

📒 Files selected for processing (1)
  • start.bat
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Agent
  • GitHub Check: PSScriptAnalyzer
  • GitHub Check: test-and-validate
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: Kensan196948G/ClaudeCode-StartUpTools-New PR: 0
File: Claude/templates/claude/CLAUDE.md:0-0
Timestamp: 2026-04-20T02:32:33.058Z
Learning: Applies to Claude/templates/claude/**/*.{js,ts,tsx,jsx,py,java,go,rs,cpp,c,cs} : Comments in code can be written in English, but explanations and documentation should be in Japanese
Learnt from: CR
Repo: Kensan196948G/ClaudeCode-StartUpTools-New PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-19T01:11:19.076Z
Learning: Applies to **/*.{js,ts,tsx,jsx,py,java,go,rb,php,cpp,c,cs,swift} : All code comments in code must be in English; external documentation and communication in Japanese.
🔇 Additional comments (1)
start.bat (1)

6-6: ASCIIコメントへの置換は適切です。

cmd.exe の文字コード依存で発生していたパース崩れ対策として妥当で、実行ロジックに影響もありません。


📝 Walkthrough

Walkthrough

start.batファイルのコメント行が日本語から英語に置き換えられました。PowerShell 7の優先付けとPATH検索失敗時の既知インストールパスの確認に関する説明文が更新されたもので、実行ロジックに変化はありません。

Changes

コホート / ファイル 概要
コメント更新
start.bat
日本語で記述されたコメントを英語に置き換え。PowerShell 7優先化とパスルックアップのフォールバック動作に関する説明。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰✨

コメント翻訳、東から西へ

言葉は変わりて、意味は同じ

バッチファイルの心、ここに活きる

🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルはバッチファイルのASCII化とcmd.exeの解析エラー修正という実際の変更内容を正確に反映しており、主要な変更内容を明確に要約しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/v3.2.55-start-bat-ascii

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a Windows cmd.exe parsing failure on CP932 locales by replacing a previously Japanese rem comment in start.bat with an English, pure-ASCII comment, avoiding mojibake that could lead to not was unexpected at this time. errors.

Changes:

  • Replace the Japanese comment in start.bat with an English ASCII-only comment to prevent CP932 mis-decoding issues.

@Kensan196948G
Kensan196948G merged commit b0d05a1 into main Apr 20, 2026
8 checks passed
@Kensan196948G
Kensan196948G deleted the fix/v3.2.55-start-bat-ascii branch April 20, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants