kahole / edamagit

Magit for VSCode

Home Page:https://marketplace.visualstudio.com/items?itemName=kahole.magit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to run 'magit status'

palchak-google opened this issue · comments

I just install edamagit v0.6.22 from the VSCode marketplace. When I try to run the command magit status, I see the following error toast:
"Command 'Magit Status' resulted in an error (Running the contributed command: 'magit status' failed.)"

Here is what I see in the Extension Host log:

[2021-09-09 10:32:20.237] [exthost] [info] ExtensionService#_doActivateExtension kahole.magit {"startup":false,"extensionId":{"value":"kahole.magit","_lower":"kahole.magit"},"activationEvent":"onCommand:magit.status"}
[2021-09-09 10:32:20.237] [exthost] [info] ExtensionService#loadCommonJSModule file:///usr/local/google/home/palchak/.vscode/extensions/kahole.magit-0.6.22/dist/extension
[2021-09-09 10:32:20.491] [exthost] [error] TypeError: e._repository.repository.exec is not a function
	at Object.t.gitRun (/usr/local/google/home/palchak/.vscode/extensions/kahole.magit-0.6.22/dist/extension.js:1:111428)
	at Object.h [as internalMagitStatus] (/usr/local/google/home/palchak/.vscode/extensions/kahole.magit-0.6.22/dist/extension.js:1:75105)
	at processTicksAndRejections (internal/process/task_queues.js:97:5)
	at async Function.getCurrentMagitRepo (/usr/local/google/home/palchak/.vscode/extensions/kahole.magit-0.6.22/dist/extension.js:1:115082)
	at async t.magitStatus (/usr/local/google/home/palchak/.vscode/extensions/kahole.magit-0.6.22/dist/extension.js:1:82351)
	at async b._executeContributedCommand (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:86:88509) magit.status

The version information for my installation is:
Version: 1.53.2
Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4
Date: 2021-02-11T11:48:44.518Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Linux x64 5.10.40-1rodete2-amd64

I have a similar problem. While magit status works for me, everything interesting that I try to do results in e._repository.repository.exec is not a function.

For example, trying to show a commit by pressing ENTER results in the following log in process.magit:

[1] git show bb7d5aa4d808ab931b2bf4108115d12d9112731b
e._repository.repository.exec is not a function

This is with VSCode on Windows 11:

Version: 1.50.1 (system setup)
Commit: d2e414d9e4239a252d1ab117bd7067f125afd80a
Date: 2020-10-13T15:06:15.712Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.22000

You're both running pretty old versions of VSCode. I recommend you upgrade and it should work.
I will update the minimum vscode version requirement, to the version that changed the exec method name.
Today it's too low:

  "engines": {
    "vscode": "^1.50.0"
  },

Thank you for the quick response. I can confirm that I no longer see the problem with latest VS Code and can now explore your extension.

(BTW: I do not update VSCode, because it tends to regularly break my workflow. For example, after updating just now I had to "trust" my own projects. A quick search for "security.workspace.trust.enabled": false got rid of this malarkey.)