-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Greater explanation of error messages #45
Comments
It looks like the bug is here. https://github.com/silverstripe/sspak/blob/master/src/Executor.php#L148 It should be outputting |
I'm going to say bug, since it looks like this code is trying to put output in the message and is using the wrong source. ;P |
Changed the message used by the thrown exception to "error" rather then "output" as mentioned in issue silverstripe#45
Ok, so I actually tested the update and it still returns "Execution failed: returned 1." So changing: https://github.com/silverstripe/sspak/blob/master/src/Executor.php#L148 As you suggest didn't help, any other ideas @tractorcow ? |
So I dropped a sneaky var_dump in Executor.php and re-built/ran. I can see that the there is an item logged: array(2) { The "return" is 1 so the exception is thrown, but it does not look like sspak see's it as an error as it has an "output" not an "error". I am not really sure how this result is being reached though... |
Are we sending any kind of silent or quiet option when running the exec? |
So I still get this issue, I have noticed however it only seems to crop up when using sspak to save/load a project that is a git repo and checked out to a tag (eg 1.0.0, release-1234 etc). I cannot see any instances of what looks like the exec being silenced either. Maybe the Exception should only be thrown when $result['error'] is actually present, so change: https://github.com/silverstripe/sspak/blob/master/src/Executor.php#L146 to something like:
|
I also got this problem,
The project is a git repo but not checked out to a tag, not branched, no remote origins, it is local on a vagrant machine.
|
I've hit the same issue:
|
Have identified that .git/config did not have the correct branches listed
A reclone of the project correctly populates the values per branch, so this one seems to be specific to the situation. |
At the moment I am getting an error "Execution failed: returned 1."
The command run is apparently: "git '--git-dir=/srv/siteroot/.git' 'config' '--get' 'branch.master.remote'"
The error message isn't very helpful, and I cannot diagnose why it is appearing. Running the command in question does not return an error.
It would be helpful is error's like this generated a hint as to what it is about? I notice error code 2 does this already?
The text was updated successfully, but these errors were encountered: