microsoft / inshellisense

IDE style command line auto complete
MIT License
8.23k stars 180 forks source link

Error: spawn pwsh ENOENT #68

Closed TylerJaacks closed 7 months ago

TylerJaacks commented 7 months ago

Describe the bug When I go to enter a command I get a crash Error: spawn pwsh ENOENT.

To Reproduce

  1. Type CTRL+A
  2. Type any command and hit enter.

Expected behavior I expect the command to run properly.

Environment

Additional context Add any other context about the problem here.

This is my D:\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

oh-my-posh --init --shell pwsh --config D:\config.json | Invoke-Expression

# Import the Chocolatey Profile that contains the necessary code to enable
# tab-completions to function for `choco`.
# Be aware that if you are missing these lines from your profile, tab completion
# for `choco` will not function.
# See https://ch0.co/tab-completion for details.

$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"

if (Test-Path($ChocolateyProfile)) {
  Import-Module "$ChocolateyProfile"
}

if(Test-Path 'D:\.inshellisense\key-bindings-pwsh.ps1' -PathType Leaf){. D:\.inshellisense\key-bindings-pwsh.ps1}

The output

> git sta
 tjaacks   ~                                                                                 in pwsh at 21:49:05      throw er; // Unhandled 'error' event
      ^

Error: spawn pwsh ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn pwsh',
  path: 'pwsh',
  spawnargs: [ '-c', 'git sta' ]
}

Node.js v21.1.0
cpendery commented 7 months ago

Closing as this should have been fixed in 0.0.1-rc.5