fix: add warning message when unable to list submodules (#1304)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
		
							parent
							
								
									4afe0ab671
								
							
						
					
					
						commit
						2106eb4457
					
				
							
								
								
									
										3
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							| @ -1821,12 +1821,13 @@ const isRepoShallow = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* ( | |||||||
| }); | }); | ||||||
| exports.isRepoShallow = isRepoShallow; | exports.isRepoShallow = isRepoShallow; | ||||||
| const submoduleExists = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () { | const submoduleExists = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () { | ||||||
|     const { stdout, exitCode } = yield exec.getExecOutput('git', ['submodule', 'status'], { |     const { stdout, exitCode, stderr } = yield exec.getExecOutput('git', ['submodule', 'status'], { | ||||||
|         cwd, |         cwd, | ||||||
|         ignoreReturnCode: true, |         ignoreReturnCode: true, | ||||||
|         silent: !core.isDebug() |         silent: !core.isDebug() | ||||||
|     }); |     }); | ||||||
|     if (exitCode !== 0) { |     if (exitCode !== 0) { | ||||||
|  |         core.warning(stderr || "Couldn't list submodules"); | ||||||
|         return false; |         return false; | ||||||
|     } |     } | ||||||
|     return stdout.trim() !== ''; |     return stdout.trim() !== ''; | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -209,7 +209,7 @@ export const submoduleExists = async ({ | |||||||
| }: { | }: { | ||||||
|   cwd: string |   cwd: string | ||||||
| }): Promise<boolean> => { | }): Promise<boolean> => { | ||||||
|   const {stdout, exitCode} = await exec.getExecOutput( |   const {stdout, exitCode, stderr} = await exec.getExecOutput( | ||||||
|     'git', |     'git', | ||||||
|     ['submodule', 'status'], |     ['submodule', 'status'], | ||||||
|     { |     { | ||||||
| @ -220,6 +220,7 @@ export const submoduleExists = async ({ | |||||||
|   ) |   ) | ||||||
| 
 | 
 | ||||||
|   if (exitCode !== 0) { |   if (exitCode !== 0) { | ||||||
|  |     core.warning(stderr || "Couldn't list submodules") | ||||||
|     return false |     return false | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tonye Jack
						Tonye Jack