vector-of-bool / vscode-gitflow

Gitflow integration for Visual Studio Code
89 stars 22 forks source link

Failed false == true assertion #13

Closed A---- closed 6 years ago

A---- commented 7 years ago

I got an error message Failed false == true assertion in the initialisation step. Right about here: https://github.com/vector-of-bool/vscode-gitflow/blob/develop/src/flow.ts#L168

I left all options to their defaults

Digging into it, it appeared that the gitflow/branch section wasn't correctly populated:

[gitflow "branch"]
        develop = develop

Fixing this by adding master = master did the trick. My guess is that both entries are trying to be written at the same time.

Developer console output:

/path/to/workbench.main.js:29 [Extension Host] [gitflow] Execute C:\Program Files\Git\cmd\git.exe config gitflow.branch.master master
/path/to/workbench.main.js:29 [Extension Host] [gitflow] Execute C:\Program Files\Git\cmd\git.exe config gitflow.branch.develop develop
/path/to/workbench.main.js:29 [Extension Host] [gitflow] Execute C:\Program Files\Git\cmd\git.exe config --get gitflow.branch.master
/path/to/workbench.main.js:29 [Extension Host] [gitflow] Command "C:\Program Files\Git\cmd\git.exe" returned code 0: 
/path/to/workbench.main.js:29 [Extension Host] [gitflow] Command "C:\Program Files\Git\cmd\git.exe" returned code 255: error: could not lock config file .git/config: File exists

/path/to/workbench.main.js:29 [Extension Host] [gitflow] Command "C:\Program Files\Git\cmd\git.exe" returned code 1: 
/path/to/workbench.main.js:29 [Extension Host] [gitflow] Execute C:\Program Files\Git\cmd\git.exe config --get gitflow.branch.develop
/path/to/workbench.main.js:29 [Extension Host] [gitflow] Command "C:\Program Files\Git\cmd\git.exe" returned code 0: 
/path/to/workbench.main.js:28 false == true
vector-of-bool commented 7 years ago

Looks like I'm not awaiting on some of the git commands, and they race. Oops. Thanks for the report!

EricDw commented 7 years ago

@vector-of-bool Is there a workaround?