mirror of
				https://github.com/actions/checkout.git
				synced 2025-11-04 00:03:35 +00:00 
			
		
		
		
	Merge 6bf54c5e8a88dc942d255d0214d306ae613de1aa into ac593985615ec2ede58e132d2e21d2b1cbd6127c
This commit is contained in:
		
						commit
						475907437c
					
				
							
								
								
									
										9
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							@ -7129,9 +7129,18 @@ class GitAuthHelper {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (configExists) {
 | 
					            if (configExists) {
 | 
				
			||||||
 | 
					                if ((yield fs.promises.lstat(gitConfigPath)).isSymbolicLink()) {
 | 
				
			||||||
 | 
					                    core.info(`.gitconfig file at ${gitConfigPath} is a symlink, copying the true file instead`);
 | 
				
			||||||
 | 
					                    // get true link
 | 
				
			||||||
 | 
					                    const symlinkFull = yield fs.promises.readlink(gitConfigPath);
 | 
				
			||||||
 | 
					                    core.info(`Copying '${symlinkFull}' to '${newGitConfigPath}'`);
 | 
				
			||||||
 | 
					                    yield io.cp(symlinkFull, newGitConfigPath);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else {
 | 
				
			||||||
                    core.info(`Copying '${gitConfigPath}' to '${newGitConfigPath}'`);
 | 
					                    core.info(`Copying '${gitConfigPath}' to '${newGitConfigPath}'`);
 | 
				
			||||||
                    yield io.cp(gitConfigPath, newGitConfigPath);
 | 
					                    yield io.cp(gitConfigPath, newGitConfigPath);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            else {
 | 
					            else {
 | 
				
			||||||
                yield fs.promises.writeFile(newGitConfigPath, '');
 | 
					                yield fs.promises.writeFile(newGitConfigPath, '');
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
@ -109,8 +109,16 @@ class GitAuthHelper {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (configExists) {
 | 
					    if (configExists) {
 | 
				
			||||||
 | 
					      if ((await fs.promises.lstat(gitConfigPath)).isSymbolicLink()) {
 | 
				
			||||||
 | 
					        core.info(`.gitconfig file at ${gitConfigPath} is a symlink, copying the true file instead`)
 | 
				
			||||||
 | 
					        // get true link
 | 
				
			||||||
 | 
					        const symlinkFull: string = await fs.promises.readlink(gitConfigPath)
 | 
				
			||||||
 | 
					        core.info(`Copying '${symlinkFull}' to '${newGitConfigPath}'`)
 | 
				
			||||||
 | 
					        await io.cp(symlinkFull, newGitConfigPath)
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
        core.info(`Copying '${gitConfigPath}' to '${newGitConfigPath}'`)
 | 
					        core.info(`Copying '${gitConfigPath}' to '${newGitConfigPath}'`)
 | 
				
			||||||
        await io.cp(gitConfigPath, newGitConfigPath)
 | 
					        await io.cp(gitConfigPath, newGitConfigPath)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      await fs.promises.writeFile(newGitConfigPath, '')
 | 
					      await fs.promises.writeFile(newGitConfigPath, '')
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user