Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: generator tries to run 'code' from the wrong shell #378

Open
sammcj opened this issue Oct 17, 2022 · 0 comments
Open

Bug: generator tries to run 'code' from the wrong shell #378

sammcj opened this issue Oct 17, 2022 · 0 comments

Comments

@sammcj
Copy link

sammcj commented Oct 17, 2022

? What type of extension do you want to create? New Extension Pack
? Add the currently installed extensions to the extension pack? Yes
/Users/samm/Library/Application Support/fnm/node-versions/v16.16.0/installation/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:405
    throw error instanceof Error ? error : new Error(error);
    ^

Error: Command failed: code --list-extensions
/bin/sh: code: command not found

    at ChildProcess.exithandler (node:child_process:398:12)
    at ChildProcess.emit (node:events:527:28)
    at ChildProcess.emit (node:domain:475:12)
    at maybeClose (node:internal/child_process:1092:16)
    at Socket.<anonymous> (node:internal/child_process:451:11)
    at Socket.emit (node:events:527:28)
    at Socket.emit (node:domain:475:12)
    at Pipe.<anonymous> (node:net:709:12) {
  code: 127,
  killed: false,
  signal: null,
  cmd: 'code --list-extensions'
}

This occurs because the generator tries to call code with /bin/sh rather than the users current shell:

echo $SHELL
/bin/zsh

and as such doesn't not have the alias to the code binary within the app.

alias code
code='/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code'
  • macOS 12.6
  • Code: 1.72.6
  • Generator: 4.3.0
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

No branches or pull requests

1 participant