Commit a96ffa2 1 parent bb65cf3 commit a96ffa2 Copy full SHA for a96ffa2
File tree 3 files changed +7
-22
lines changed
3 files changed +7
-22
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ describe('git', () => {
54
54
} )
55
55
56
56
await init ( action )
57
- expect ( execute ) . toHaveBeenCalledTimes ( 8 )
57
+ expect ( execute ) . toHaveBeenCalledTimes ( 7 )
58
58
} )
59
59
60
60
it ( 'should catch when a function throws an error' , async ( ) => {
@@ -101,7 +101,7 @@ describe('git', () => {
101
101
} )
102
102
103
103
await init ( action )
104
- expect ( execute ) . toHaveBeenCalledTimes ( 8 )
104
+ expect ( execute ) . toHaveBeenCalledTimes ( 7 )
105
105
} )
106
106
107
107
it ( 'should not unset git config if a user is using ssh' , async ( ) => {
@@ -123,7 +123,7 @@ describe('git', () => {
123
123
} )
124
124
125
125
await init ( action )
126
- expect ( execute ) . toHaveBeenCalledTimes ( 7 )
126
+ expect ( execute ) . toHaveBeenCalledTimes ( 6 )
127
127
128
128
process . env . CI = undefined
129
129
} )
@@ -144,7 +144,7 @@ describe('git', () => {
144
144
} )
145
145
146
146
await init ( action )
147
- expect ( execute ) . toHaveBeenCalledTimes ( 8 )
147
+ expect ( execute ) . toHaveBeenCalledTimes ( 7 )
148
148
} )
149
149
} )
150
150
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ describe('main', () => {
53
53
debug : true
54
54
} )
55
55
await run ( action )
56
- expect ( execute ) . toHaveBeenCalledTimes ( 19 )
56
+ expect ( execute ) . toHaveBeenCalledTimes ( 18 )
57
57
expect ( rmRF ) . toHaveBeenCalledTimes ( 1 )
58
58
expect ( exportVariable ) . toHaveBeenCalledTimes ( 1 )
59
59
} )
@@ -73,7 +73,7 @@ describe('main', () => {
73
73
isTest : TestFlag . HAS_CHANGED_FILES
74
74
} )
75
75
await run ( action )
76
- expect ( execute ) . toHaveBeenCalledTimes ( 22 )
76
+ expect ( execute ) . toHaveBeenCalledTimes ( 21 )
77
77
expect ( rmRF ) . toHaveBeenCalledTimes ( 1 )
78
78
expect ( exportVariable ) . toHaveBeenCalledTimes ( 1 )
79
79
} )
Original file line number Diff line number Diff line change @@ -24,22 +24,7 @@ export async function init(action: ActionInterface): Promise<void | Error> {
24
24
info ( 'Configuring git…' )
25
25
26
26
/**
27
- * Add safe directory to the global git config.
28
- */
29
- try {
30
- await execute (
31
- `git config --global safe.directory '*'` ,
32
- action . workspace ,
33
- action . silent
34
- )
35
- } catch {
36
- info ( 'Unable to set workflow file tree as a safe directory…' )
37
- }
38
-
39
- /**
40
- * Ensure that the workspace is a safe directory, this is somewhat redundant as the action
41
- * will always set the workspace as a safe directory, but this is a fallback in case the action
42
- * fails to do so.
27
+ * Ensure that the workspace is a safe directory.
43
28
*/
44
29
try {
45
30
await execute (
You can’t perform that action at this time.
0 commit comments