Skip to content

Commit

Permalink
Use quotes for commit message, not apostrophes
Browse files Browse the repository at this point in the history
Using apostrophes instead of quotes in some environment seems to cause git to attempt to evaluate the commit message and throw the following errors:

```
[2018-08-02 17:05:04] staging.ERROR: Spock command exited unsuccessfully:
Command: git commit -m 'Page saved by user'
Output: No output
Error: 
error: pathspec 'saved' did not match any file(s) known to git.
error: pathspec 'by' did not match any file(s) known to git.
error: pathspec 'user'' did not match any file(s) known to git.
```

The change in this commit should resolve the issue.
  • Loading branch information
alwaysblank authored Aug 2, 2018
1 parent d9564a8 commit b4a89a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/Spock/Git.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function commands()
$commands[] = "git add {$path}";
}

$commands[] = vsprintf("git commit -m '%s%s'", [
$commands[] = vsprintf('git commit -m "%s%s"', [
$this->label(),
$this->user ? ' by ' . $this->user->username() : ''
]);
Expand Down

0 comments on commit b4a89a4

Please # to comment.