randy3k / Terminus

Bring a real terminal to Sublime Text
https://packagecontrol.io/packages/Terminus
MIT License
1.39k stars 82 forks source link

Unable to run busybox shell withoud cmd #277

Open d-faure opened 3 years ago

d-faure commented 3 years ago

I'm used to use BusyBox for Win32 as a convenient shell on Windows, but couldn't use it from Terminus under ST4 without the help of an underlying system command prompt (which is not the case when run from ConEmu or Windows Terminal).

{
    "shell_configs": [
        {
            "name": "BusyBox",
            "cmd": [
                "cmd.exe", "/c", /* _shouldn't_be_required_:(  */
                "C:/Tools/ConEmu/busybox/busybox64.exe",
                "sh", "-d", "C:/Tools/ConEmu/busybox", "-s", "-i", "-c", ". etc/profile"
            ],
            "env": {},
            "enable": true,
            "platforms": ["windows"]
        },
}

The resulting execution (without cmd /c) is:

: applet not found                                                                                                                              
process is terminated with return code 127.

Instead of:

BusyBox v1.34.0-FRP-3902-g61e53aa93 (2021-03-02 15:10:05 GMT)                                                                                   

C:/Tools/ConEmu/busybox $ 

with a C:/Tools/ConEmu/busybox/etc/profile file containing the following code:

head --help 2>&1 | head -n 2 # in order to get a busybox banner
randy3k commented 3 years ago

I don't have any experiences with busybox, but It seems to me that there are some PATH issues.