Sublime Forum

Basic shell commands not working in scripts

#1

When Sublime plugins run scripts (like the eslint or prettier shell scripts that call the Node.js files), basic shell commands like dirname within the scripts seem to not exist. These scripts use #!/bin/sh at the top, which points to /bin/bash on my system, though I’m on a Mac where zsh is the default shell.

The exact error I get when trying to run eslint through SublimeLinter-eslint is:

/Users/path_to_repo/node_modules/.bin/eslint: line 2: sed: command not found
/Users/path_to_repo/node_modules/.bin/eslint: line 2: dirname: command not found
/Users/path_to_repo/node_modules/.bin/eslint: line 4: uname: command not found

This is on a completely fresh install of Sublime Text 4, v4152. So far, I’ve only installed a few plugins such as SublimeLinter and SidebarEnhancements.

0 Likes