Closed timvdalen closed 8 years ago
Did you install new version of Git or something? There was no change to this functionality in a very long time.
No, I didn't change anything in my system. git commands work fine by the way, it's just the terminal button that has stopped working.
No idea, try debugging this method in debug tools of Brackets: https://github.com/zaggino/brackets-git/blob/3bafdb06c7b06f48e826ef2b1daeaa450c344459/src/utils/Terminal.js#L45
The problem seems to be inside Cli.executeCommand
.
The promised returned there never resolves or rejects.
Stepping through that function, I noticed that here: https://github.com/zaggino/brackets-git/blob/3bafdb06c7b06f48e826ef2b1daeaa450c344459/src/Cli.js#L210 resolved is false, but out is empty.
I'm not really sure what that means but I'm guessing that nodeConnection.domains[domainName][method](opts.cwd, cmd, args, domainOpts)
is the thing that actually executes the command?
That look fine, out
should be empty there because terminal command doesn't return anything. Promise gets resolved so the line was executed. Weird that it doesn't open the terminal on your machine. Maybe it's something with cygwin? Have you tried using the default mintty which comes with Git? The one in C:\Program Files\Git\git-bash.exe (the default for the extension)
But shouldn't resolved be true
if the command executed successfully?
I don't have git-bash installed but I'll give that a try. Note however that it also doesn't work with any other program (for instance cmd.exe). All options I've tried pass the 'validation' stage where the plugin figures out if the executable actually exists.
All commands also work fine if I try to execute them as a system call (or through another terminal or the windows run dialog).
resolved
variable holds the boolean information about the promise and false
means it was not yet resolved (by timeout or task cancellation)
Try executing some bat
file (echo helloworld
) which returns some text and see if that text gets through I guess.
Oh I see, that's the status for the promise returned by the main function, not nodeConnection.domains[domainName][method]
I'll dig deeper into that function.
Try executing some bat file (echo helloworld) which returns some text and see if that text gets through I guess.
I've already tried that (and something like touch
) but it really looks like it's not being executed.
It's weird that this doesn't work and the git commands do ... they share the nodeConnection.domains[domainName][method]
part ... are you running with administrator rights on the machine?
I just tried setting my terminal command to my git path, with as arg init
.
If I execute that, the nodeConnection.domains[domainName][method]
function is executed with correect\path\to\git.exe
, ["init"]
, after which nothing happens.
While trying to reproduce what happened when I clicked the Init
button in the UI, I discovered that that, too, didn't do anything.
Most of the other commands (at least committing, branching, pulling, pushing) work fine.
I think I'll try to reinstall Brackets, the plugin, clean my preferences file and see where that gets me.
Okay, my button just started working again. I have no idea what changed, but I'm going to assume this plugin had nothing to do with the actual problem.
Well, I definitely didn't change any codes :) Closing this then...
Starting today, the open terminal button has stopped working.
In the console, I see the following:
Executing this command (through an existing terminal or the Windows Run dialog) works fine.
I tried replacing the terminal command with
touch
, which seems to confirm that the command is not being executed.