fix: rewrite shell scripts to Node.js for cross-platform compatibility#4
fix: rewrite shell scripts to Node.js for cross-platform compatibility#4doggy8088 wants to merge 1 commit intogemini-cli-extensions:mainfrom
Conversation
Fixes gemini-cli-extensions#3 - Windows PowerShell cannot execute .sh scripts without additional tools like Git Bash, WSL, or Cygwin. Changes: - Convert hooks/stop-hook.sh to hooks/stop-hook.js - Convert scripts/cancel.sh to scripts/cancel.js - Convert scripts/setup.sh to scripts/setup.js - Convert tests/hook_test.sh to tests/hook_test.js - Convert tests/setup_test.sh to tests/setup_test.js - Update hooks/hooks.json to reference stop-hook.js - Update commands/ralph/cancel.toml to use node with cancel.js - Update commands/ralph/loop.toml to use node with setup.js - Update README.md to reflect new .js file references All scripts now use Node.js built-in modules (fs, path, child_process) with no external dependencies, ensuring compatibility across Windows, macOS, and Linux platforms.
|
What are your thoughts on how pickle rick does this by creating ps1 equivalents to all bash scripts. I see the PRO as not relying on the user having nodejs intalled. The CON is duplicative scripts and having to do routing. https://github.com/galz10/pickle-rick-extension/tree/main/scripts |
|
I see here: https://github.com/galz10/pickle-rick-extension/blob/main/hooks/hooks.json This is still assuming the user has installed Python, but there are still people who may not install Python. It looks like the Hooks in Gemini CLI don’t set up different scripts based on OS differences, right? |
isn't nodejs a pre-requisite? so relying on nodejs isn't a new dependency. |
Fixes #3 - Windows PowerShell cannot execute .sh scripts without additional tools like Git Bash, WSL, or Cygwin.
Changes:
All scripts now use Node.js built-in modules (fs, path, child_process) with no external dependencies, ensuring compatibility across Windows, macOS, and Linux platforms.