From b4a89a4c7cff3ef5ff6da35471d6507182f65076 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 2 Aug 2018 10:17:04 -0700 Subject: [PATCH] Use quotes for commit message, not apostrophes 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. --- addons/Spock/Git.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/Spock/Git.php b/addons/Spock/Git.php index f7ac2b4..88e0bea 100644 --- a/addons/Spock/Git.php +++ b/addons/Spock/Git.php @@ -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() : '' ]);