Nothing is converted when the file path contains a space
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 84/100
Línea de trabajo
Lee JsModules.py y céntrate en JsModulesFileCommand y JsModulesDirCommand, donde shell_cmd se construye a partir de la ruta del archivo activo. Compara el array de argumentos cmd documentado por Sublime con shell_cmd y, después, verifica que ambos comandos gestionen la ruta indicada con espacios. Se considera terminado cuando el conversor encuentra y convierte el archivo en una ruta con espacios y las rutas normales siguen funcionando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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 showsRunning 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.
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de luwes/SublimeJsModules
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Todos los issues de luwes/SublimeJsModules
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fossasia/visdom-dev#77 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
aws-cloudformation/cfn-lint#4890 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
volcengine/OpenViking#6521 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
AstrBotDevs/AstrBot#10720 ·
Los mantenedores suelen responder en 1 día
-
fix(xiaomi): curated picker list still offers six ids that return 400 (plan-limited vs retired)Abiertocause/upstream comp/cli P2 provider/other tool/file type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NousResearch/hermes-agent#143900 ·
Los mantenedores suelen responder en 1 día