@@ -26,31 +26,12 @@ function init(action) {
26
26
try {
27
27
( 0 , core_1 . info ) ( `Deploying using ${ action . tokenType } … 🔑` ) ;
28
28
( 0 , core_1 . info ) ( 'Configuring git…' ) ;
29
- function configure ( throwOnError ) {
30
- return __awaiter ( this , void 0 , void 0 , function * ( ) {
31
- try {
32
- yield ( 0 , execute_1 . execute ) ( `git config --global --add safe.directory "${ action . workspace } "` , action . workspace , action . silent ) ;
33
- yield ( 0 , execute_1 . execute ) ( `git config user.name "${ action . name } "` , action . workspace , action . silent ) ;
34
- yield ( 0 , execute_1 . execute ) ( `git config user.email "${ action . email } "` , action . workspace , action . silent ) ;
35
- yield ( 0 , execute_1 . execute ) ( `git config core.ignorecase false` , action . workspace , action . silent ) ;
36
- }
37
- catch ( _a ) {
38
- ( 0 , core_1 . info ) ( 'There was a problemissue initilizing git, attempting to resolve …' ) ;
39
- if ( throwOnError ) {
40
- throw new Error ( ) ;
41
- }
42
- }
43
- } ) ;
44
- }
45
- try {
46
- yield configure ( false ) ;
47
- }
48
- catch ( _a ) {
49
- // Attempt to re-run if initial configuration failed using git init.
50
- yield ( 0 , execute_1 . execute ) ( `git init` , action . workspace , action . silent ) ;
51
- yield ( 0 , execute_1 . execute ) ( `git commit -m "Initial commit" --allow-empty` , action . workspace , action . silent ) ;
52
- yield configure ( true ) ;
53
- }
29
+ yield ( 0 , execute_1 . execute ) ( `git init` , action . workspace , action . silent ) ;
30
+ yield ( 0 , execute_1 . execute ) ( `git commit -m "Initial commit" --allow-empty` , action . workspace , action . silent ) ;
31
+ yield ( 0 , execute_1 . execute ) ( `git config --global --add safe.directory "${ action . workspace } "` , action . workspace , action . silent ) ;
32
+ yield ( 0 , execute_1 . execute ) ( `git config user.name "${ action . name } "` , action . workspace , action . silent ) ;
33
+ yield ( 0 , execute_1 . execute ) ( `git config user.email "${ action . email } "` , action . workspace , action . silent ) ;
34
+ yield ( 0 , execute_1 . execute ) ( `git config core.ignorecase false` , action . workspace , action . silent ) ;
54
35
try {
55
36
if ( ( process . env . CI && ! action . sshKey ) || action . isTest ) {
56
37
/* Ensures that previously set Git configs do not interfere with the deployment.
@@ -62,7 +43,7 @@ function init(action) {
62
43
throw new Error ( ) ;
63
44
}
64
45
}
65
- catch ( _b ) {
46
+ catch ( _a ) {
66
47
( 0 , core_1 . info ) ( 'Unable to unset previous git config authentication as it may not exist, continuing…' ) ;
67
48
}
68
49
try {
@@ -71,7 +52,7 @@ function init(action) {
71
52
throw new Error ( ) ;
72
53
}
73
54
}
74
- catch ( _c ) {
55
+ catch ( _b ) {
75
56
( 0 , core_1 . info ) ( 'Attempted to remove origin but failed, continuing…' ) ;
76
57
}
77
58
yield ( 0 , execute_1 . execute ) ( `git remote add origin ${ action . repositoryPath } ` , action . workspace , action . silent ) ;
0 commit comments