File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 5
5
branches : [master]
6
6
pull_request :
7
7
branches : [master]
8
+ workflow_dispatch :
8
9
9
10
jobs :
10
11
continuous_integration_build :
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env ruby
2
2
3
3
require File . dirname ( __FILE__ ) + '/../test_helper'
4
+ require "fileutils"
4
5
5
6
# tests all the low level git communication
6
7
#
@@ -51,8 +52,13 @@ def test_commit_with_no_verify
51
52
move_file ( pre_commit_path , pre_commit_path_bak )
52
53
53
54
# Adds a pre-commit file that should throw an error
54
- create_file ( pre_commit_path , 'echo Pre-commit file. Shoud not execute; exit 1' ) # Error when executed
55
- File . chmod ( 0111 , pre_commit_path )
55
+ create_file ( pre_commit_path , <<~PRE_COMMIT_SCRIPT )
56
+ #!/bin/sh
57
+ echo "pre-commit script exits with an error"
58
+ exit 1
59
+ PRE_COMMIT_SCRIPT
60
+
61
+ FileUtils . chmod ( "+x" , pre_commit_path )
56
62
57
63
create_file ( "#{ @wdir } /test_file_2" , 'content test_file_2' )
58
64
@lib . add ( 'test_file_2' )
You can’t perform that action at this time.
0 commit comments