egomobile / vscode-powertools

A swiss army knife with lots of tools, extensions and (scriptable) enhancements for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=egomobile.vscode-powertools
GNU Lesser General Public License v3.0
68 stars 9 forks source link

[bug] - Can't run an npm script inside a Devcontainer #13

Open ontoneio opened 1 year ago

ontoneio commented 1 year ago

Not sure if this container supports the devcontainer spec, but I am running into this error when clicking on my simple button that triggers an NPM script.

ERROR: Could not execute button: [Error] 'Command failed: npm run prepare-commit fatal: empty ident name (for <>) not allowed '

Here is my configuration that exists in the devcontainer.json file required for devcontainer spec.

"settings": {
            "ego.power-tools": {
              "buttons": [
                  {
                      "text": "Prepare Commit MSG",
                      "tooltip": "Runs 'npm prepare-commit'",
                      "action": {
                          "type": "shell",
                          "command": "npm run prepare-commit"
                      }
                  }
              ]
            }
          }

Expected Behavior: Run the NPM script

ontoneio commented 1 year ago

Tried rerunning this same script and I get a different error now.

Is this extension even being maintained anymore?

Could not execute button: [Error] 'Command failed: npm run prepare-commit INFO: Config validated successfully .husky/prepare-commit-msg: 5: cannot open /dev/tty: No such device or address husky - prepare-commit-msg hook exited with code 2 (error) '

When run without the Ego Power button the script does in fact work. Seems like Ego doesn't have access to certain permissions on the file system?