diff --git a/template/build/core/phing/tasks/validate.xml b/template/build/core/phing/tasks/validate.xml index 8c7c9887b..7c425e5ce 100644 --- a/template/build/core/phing/tasks/validate.xml +++ b/template/build/core/phing/tasks/validate.xml @@ -33,6 +33,7 @@ + diff --git a/template/scripts/blt/update-scaffold b/template/scripts/blt/update-scaffold index e0f79bdf1..38e2167c2 100755 --- a/template/scripts/blt/update-scaffold +++ b/template/scripts/blt/update-scaffold @@ -37,6 +37,6 @@ done # Restore execute permissions. chmod 755 blt.sh -chmod 755 scripts/git-hooks/pre-commit +chmod -R 755 scripts/git-hooks/pre-commit echo "Changes have been pulled down. Please review and commit desired changes." diff --git a/template/tests/phpunit/Bolt/GitTest.php b/template/tests/phpunit/Bolt/GitTest.php index c60c03eae..bbd80a1b2 100644 --- a/template/tests/phpunit/Bolt/GitTest.php +++ b/template/tests/phpunit/Bolt/GitTest.php @@ -87,13 +87,11 @@ protected function assertCommitMessageValidity($is_valid, $commit_message, $mess chdir($this->projectDirectory); // "2>&1" redirects standard error output to standard output. - $command = "git commit --amend -m '$commit_message' 2>&1"; + $command = "mkdir -p {$this->projectDirectory}/tmp && echo '$commit_message' > {$this->projectDirectory}/tmp/blt_commit_msg && {$this->projectDirectory}/.git/hooks/commit-msg {$this->projectDirectory}/tmp/blt_commit_msg 2>&1"; print "Executing \"$command\" \n"; - $output = shell_exec($command); - $invalid_commit_text = 'Invalid commit message'; - $output_contains_invalid_commit_text = (bool) strstr($output, $invalid_commit_text); - $this->assertNotSame($is_valid, $output_contains_invalid_commit_text, $message); + exec($command, $output, $return); + $this->assertNotSame($is_valid, (bool) $return, $message); } }