mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 18:34:20 +08:00 
			
		
		
		
	.
This commit is contained in:
		
							parent
							
								
									1929737c8e
								
							
						
					
					
						commit
						317d15a1e8
					
				
							
								
								
									
										10
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| @ -446,11 +446,12 @@ class GitAuthHelper { | |||||||
|      */ |      */ | ||||||
|     removeSsh() { |     removeSsh() { | ||||||
|         return __awaiter(this, void 0, void 0, function* () { |         return __awaiter(this, void 0, void 0, function* () { | ||||||
|             var _a; |             var _a, _b; | ||||||
|             // SSH key
 |             // SSH key
 | ||||||
|             const keyPath = this.sshKeyPath || stateHelper.SshKeyPath; |             const keyPath = this.sshKeyPath || stateHelper.SshKeyPath; | ||||||
|             if (keyPath) { |             if (keyPath) { | ||||||
|                 try { |                 try { | ||||||
|  |                     core.info(`Removing SSH key '${keyPath}'`); | ||||||
|                     yield io.rmRF(keyPath); |                     yield io.rmRF(keyPath); | ||||||
|                 } |                 } | ||||||
|                 catch (err) { |                 catch (err) { | ||||||
| @ -462,13 +463,16 @@ class GitAuthHelper { | |||||||
|             const knownHostsPath = this.sshKnownHostsPath || stateHelper.SshKnownHostsPath; |             const knownHostsPath = this.sshKnownHostsPath || stateHelper.SshKnownHostsPath; | ||||||
|             if (knownHostsPath) { |             if (knownHostsPath) { | ||||||
|                 try { |                 try { | ||||||
|  |                     core.info(`Removing SSH known hosts '${knownHostsPath}'`); | ||||||
|                     yield io.rmRF(knownHostsPath); |                     yield io.rmRF(knownHostsPath); | ||||||
|                 } |                 } | ||||||
|                 catch (_b) { |                 catch (err) { | ||||||
|                     // Intentionally empty
 |                     core.debug(`${(_b = err === null || err === void 0 ? void 0 : err.message) !== null && _b !== void 0 ? _b : err}`); | ||||||
|  |                     core.warning(`Failed to remove SSH known hosts '${knownHostsPath}'`); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             // SSH command
 |             // SSH command
 | ||||||
|  |             core.info("Removing SSH command configuration"); | ||||||
|             yield this.removeGitConfig(SSH_COMMAND_KEY); |             yield this.removeGitConfig(SSH_COMMAND_KEY); | ||||||
|             yield this.removeSubmoduleGitConfig(SSH_COMMAND_KEY); |             yield this.removeSubmoduleGitConfig(SSH_COMMAND_KEY); | ||||||
|         }); |         }); | ||||||
|  | |||||||
| @ -423,6 +423,7 @@ class GitAuthHelper { | |||||||
|     const keyPath = this.sshKeyPath || stateHelper.SshKeyPath |     const keyPath = this.sshKeyPath || stateHelper.SshKeyPath | ||||||
|     if (keyPath) { |     if (keyPath) { | ||||||
|       try { |       try { | ||||||
|  |         core.info(`Removing SSH key '${keyPath}'`) | ||||||
|         await io.rmRF(keyPath) |         await io.rmRF(keyPath) | ||||||
|       } catch (err) { |       } catch (err) { | ||||||
|         core.debug(`${(err as any)?.message ?? err}`) |         core.debug(`${(err as any)?.message ?? err}`) | ||||||
| @ -435,13 +436,16 @@ class GitAuthHelper { | |||||||
|       this.sshKnownHostsPath || stateHelper.SshKnownHostsPath |       this.sshKnownHostsPath || stateHelper.SshKnownHostsPath | ||||||
|     if (knownHostsPath) { |     if (knownHostsPath) { | ||||||
|       try { |       try { | ||||||
|  |         core.info(`Removing SSH known hosts '${knownHostsPath}'`) | ||||||
|         await io.rmRF(knownHostsPath) |         await io.rmRF(knownHostsPath) | ||||||
|       } catch { |       } catch (err) { | ||||||
|         // Intentionally empty
 |         core.debug(`${(err as any)?.message ?? err}`) | ||||||
|  |         core.warning(`Failed to remove SSH known hosts '${knownHostsPath}'`) | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // SSH command
 |     // SSH command
 | ||||||
|  |     core.info("Removing SSH command configuration") | ||||||
|     await this.removeGitConfig(SSH_COMMAND_KEY) |     await this.removeGitConfig(SSH_COMMAND_KEY) | ||||||
|     await this.removeSubmoduleGitConfig(SSH_COMMAND_KEY) |     await this.removeSubmoduleGitConfig(SSH_COMMAND_KEY) | ||||||
|   } |   } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 eric sciple
						eric sciple