mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 15:47:36 +00:00 
			
		
		
		
	.
This commit is contained in:
		
							
								
								
									
										8
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -498,6 +498,10 @@ class GitAuthHelper { | ||||
|             } | ||||
|             // Remove credentials config files
 | ||||
|             for (const credentialsPath of credentialsPaths) { | ||||
|                 // Only remove credentials config files if they are under RUNNER_TEMP
 | ||||
|                 const runnerTemp = process.env['RUNNER_TEMP']; | ||||
|                 assert.ok(runnerTemp, 'RUNNER_TEMP is not defined'); | ||||
|                 if (credentialsPath.startsWith(runnerTemp)) { | ||||
|                     try { | ||||
|                         core.info(`Removing credentials config '${credentialsPath}'`); | ||||
|                         yield io.rmRF(credentialsPath); | ||||
| @@ -507,6 +511,10 @@ class GitAuthHelper { | ||||
|                         core.warning(`Failed to remove credentials config '${credentialsPath}'`); | ||||
|                     } | ||||
|                 } | ||||
|                 else { | ||||
|                     core.debug(`Skipping removal of credentials config '${credentialsPath}' - not under RUNNER_TEMP`); | ||||
|                 } | ||||
|             } | ||||
|         }); | ||||
|     } | ||||
|     /** | ||||
|   | ||||
| @@ -473,6 +473,10 @@ class GitAuthHelper { | ||||
|  | ||||
|     // Remove credentials config files | ||||
|     for (const credentialsPath of credentialsPaths) { | ||||
|       // Only remove credentials config files if they are under RUNNER_TEMP | ||||
|       const runnerTemp = process.env['RUNNER_TEMP'] | ||||
|       assert.ok(runnerTemp, 'RUNNER_TEMP is not defined') | ||||
|       if (credentialsPath.startsWith(runnerTemp)) { | ||||
|         try { | ||||
|           core.info(`Removing credentials config '${credentialsPath}'`) | ||||
|           await io.rmRF(credentialsPath) | ||||
| @@ -482,6 +486,9 @@ class GitAuthHelper { | ||||
|             `Failed to remove credentials config '${credentialsPath}'` | ||||
|           ) | ||||
|         } | ||||
|       } else { | ||||
|         core.debug(`Skipping removal of credentials config '${credentialsPath}' - not under RUNNER_TEMP`) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 eric sciple
					eric sciple