mirror of https://github.com/actions/setup-go.git
				
				
				
			move symlink check
Signed-off-by: Anton Troshin <anton@diagrid.io>
This commit is contained in:
		
							parent
							
								
									6cd0eaadd6
								
							
						
					
					
						commit
						fd3fcb34ee
					
				|  | @ -239,16 +239,16 @@ async function cacheWindowsDir( | |||
|       fs.mkdirSync(path.dirname(cachePath.actualPath), {recursive: true}); | ||||
|     } else { | ||||
|       core.info(`Directory ${cachePath.actualPath} already exists`); | ||||
|       // make sure the link is pointing to the actual cache directory
 | ||||
|       const symlinkTarget = fs.readlinkSync(cachePath.defaultPath); | ||||
|       if (symlinkTarget !== "") { | ||||
|         core.info(`Found link ${cachePath.defaultPath} => ${symlinkTarget}`); | ||||
|       } else { | ||||
|         fs.symlinkSync(cachePath.actualPath, cachePath.defaultPath, 'junction'); | ||||
|         core.info( | ||||
|           `Created link ${cachePath.defaultPath} => ${cachePath.actualPath}` | ||||
|         ); | ||||
|       } | ||||
|     } | ||||
|     // make sure the link is pointing to the actual cache directory
 | ||||
|     const symlinkTarget = fs.readlinkSync(cachePath.defaultPath); | ||||
|     if (symlinkTarget !== "") { | ||||
|       core.info(`Found link ${cachePath.defaultPath} => ${symlinkTarget}`); | ||||
|     } else { | ||||
|       fs.symlinkSync(cachePath.actualPath, cachePath.defaultPath, 'junction'); | ||||
|       core.info( | ||||
|         `Created link ${cachePath.defaultPath} => ${cachePath.actualPath}` | ||||
|       ); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Anton Troshin
						Anton Troshin