Skip to content

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

Open

Description

@sammcj
? 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions