Skip to content

Add compatibility to the WSL - #113

Open
holmgrein wants to merge 1 commit into
openai:mainfrom
holmgrein:main
Open

Add compatibility to the WSL#113
holmgrein wants to merge 1 commit into
openai:mainfrom
holmgrein:main

Conversation

@holmgrein

Copy link
Copy Markdown

Problem

The backend script is a Bash script (uses bash features and shebang). If a non-Bash shell runs it, it doesn’t understand ./run.sh, fails early, and produces “'.' is not recognized as an internal or external command”.

Solution

Changing the npm script to bash -lc './backend/scripts/run.sh' pins the shell to Bash, so:
◦ ./path execution works
◦ Bash features (set -euo pipefail, source, etc.) work
◦ Behavior is consistent in WSL, Git Bash, and Unix shells

What changed

• In managed-chatkit/package.json: scripts.backend from ./backend/scripts/run.sh to bash -lc './backend/scripts/run.sh'.

Alternatives you could use instead

• Add an .npmrc with script-shell set to bash globally for the repo.
• Change the script to a POSIX-sh compatible script and call sh ./backend/scripts/run.sh (only if it truly needs no Bash features).

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