lalilaloe / wttab

Programmatically open Windows Terminal tab or window
MIT License
4 stars 2 forks source link

Error: Command failed: cmd.exe /c "echo %LocalAppData%" /bin/sh: 1: cmd.exe: not found #22

Closed anodynos closed 1 year ago

anodynos commented 1 year ago

Hi, I'm getting this, I'm not sure if I'm using it in the proper environment:

I've tried through normal bash and zsh - result is the same:

anodynos@Dellino:~$ wttab -w "Foobar"
/bin/sh: 1: cmd.exe: not found
node:child_process:828
    err = new Error(msg);
          ^

Error: Command failed: cmd.exe /c "echo %LocalAppData%"
/bin/sh: 1: cmd.exe: not found

    at checkExecSyncError (node:child_process:828:11)
    at execSync (node:child_process:902:15)
    at wtSettings (file:///home/anodynos/.asdf/installs/nodejs/16.14.0/.npm/lib/node_modules/wttab/index.js:123:22)
    at file:///home/anodynos/.asdf/installs/nodejs/16.14.0/.npm/lib/node_modules/wttab/index.js:161:18
    at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:337:24)
    at async loadESM (node:internal/process/esm_loader:88:5)
    at async handleMainPromise (node:internal/modules/run_main:61:12) {

I'm using Windows 10, with WSL 1 (cause its so much faster in I/O) & Ubuntu 20.04

PS C:\Users\dell>  wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu-20.04           Running         1
anodynos commented 1 year ago

Closing, I needed to have the $PATH properly setup. Now I'm having /bin/sh: 1: cmd.exe: Exec format error but it's not wttab's fault.