File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,12 @@ const gitFetchApi = async (repoId) => {
9
9
cwd : fetchRepopath . getRepoPath ( repoId ) ,
10
10
} )
11
11
. then ( ( { stdout, stderr } ) => {
12
- if ( stdout && ! stderr ) {
13
- const fetchResponse = stdout . trim ( ) . split ( "\n" ) ;
14
- if ( fetchResponse && fetchResponse . length > 0 ) {
12
+ if ( stdout || stderr ) {
13
+ // Git fetch alone returns the result in the standard error stream
14
+ const fetchResponse = stderr . trim ( ) . split ( "\n" ) ;
15
+
16
+ console . log ( "Fetch Response :" + fetchResponse ) ;
17
+ if ( fetchResponse ) {
15
18
return {
16
19
status : "FETCH_PRESENT" ,
17
20
fetchedItems : fetchResponse ,
@@ -22,7 +25,6 @@ const gitFetchApi = async (repoId) => {
22
25
} ;
23
26
}
24
27
} else {
25
- console . log ( stderr ) ;
26
28
return {
27
29
status : "FETCH_ABSENT" ,
28
30
} ;
You can’t perform that action at this time.
0 commit comments