mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 18:18:37 +08:00 
			
		
		
		
	update the correct config
This commit is contained in:
		
							parent
							
								
									72b08f7601
								
							
						
					
					
						commit
						01e894d3c0
					
				
							
								
								
									
										4
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -5631,7 +5631,9 @@ function configureAuthToken(git, authToken, global) { | |||
|         const basicCredential = Buffer.from(`x-access-token:${authToken}`, 'utf8').toString('base64'); | ||||
|         core.setSecret(basicCredential); | ||||
|         // Replace the value in the config file
 | ||||
|         const configPath = path.join(git.getWorkingDirectory(), '.git', 'config'); | ||||
|         const configPath = global | ||||
|             ? path.join(process.env.HOME, '.gitconfig') | ||||
|             : path.join(git.getWorkingDirectory(), '.git', 'config'); | ||||
|         let content = (yield fs.promises.readFile(configPath)).toString(); | ||||
|         const placeholderIndex = content.indexOf(placeholder); | ||||
|         if (placeholderIndex < 0 || | ||||
|  |  | |||
|  | @ -285,7 +285,9 @@ async function configureAuthToken( | |||
|   core.setSecret(basicCredential) | ||||
| 
 | ||||
|   // Replace the value in the config file
 | ||||
|   const configPath = path.join(git.getWorkingDirectory(), '.git', 'config') | ||||
|   const configPath = global | ||||
|     ? path.join(process.env.HOME as string, '.gitconfig') | ||||
|     : path.join(git.getWorkingDirectory(), '.git', 'config') | ||||
|   let content = (await fs.promises.readFile(configPath)).toString() | ||||
|   const placeholderIndex = content.indexOf(placeholder) | ||||
|   if ( | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Jonathan Grimes
						Jonathan Grimes