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

Nothing is converted when the file path contains a space

オープン 初心者向け
#3 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
tooling

調査の方向性

JsModules.pyを読み、アクティブなファイルのパスからshell_cmdが組み立てられるJsModulesFileCommandとJsModulesDirCommandに注目してください。Sublimeでドキュメント化されているcmd引数の配列とshell_cmdを比較し、両方のコマンドが報告された空白を含むパスを処理できることを確認してください。空白を含むパスにあるファイルをコンバーターが見つけて変換でき、通常のパスも引き続き機能すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Claude reports: on Windows the commands convert nothing when the file path contains a space, and the exec panel says "Found 0 files".

Tested with JsModules 0.0.2 on Sublime Text 4215 (Windows), cjs-to-es6 installed globally with npm. The same two-line file a.js (const x = require('y'); module.exports = x;) in two folders:

  • ...\jsmok\a.js: "JsModules: Convert file to ES module" prints "Found 1 files ... 1 ok".
  • ...\jsm space dir\a.js: the console shows Running cjs-to-es6 C:\...\jsm space dir\a.js, and the exec panel shows "Found 0 files." followed by "Error: You have to provide at least one file/directory to transform."

JsModules.py builds the command with "cjs-to-es6 {0}".format(active_file) and passes it as shell_cmd, so the path is split at the spaces. Both commands do this (JsModulesFileCommand and JsModulesDirCommand).

Running the same command through the exec command with the path as its own list item works for the folder with spaces:

exec {"cmd": ["cjs-to-es6", "C:\\...\\jsm space dir\\a.js"], "shell": true}

That printed "Found 1 files ... 1 ok" for the same file. Sublime's build system docs describe cmd as an array of arguments and shell_cmd as a string passed to the shell (https://www.sublimetext.com/docs/build_systems.html). Changing both commands to the cmd form (or quoting the path) should fix it.

主要言語
Python
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

luwes/SublimeJsModules のほかの issue

luwes/SublimeJsModules の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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