mirror of https://github.com/actions/setup-go.git
				
				
				
			more logs and logic change
Signed-off-by: Anton Troshin <anton@diagrid.io>
This commit is contained in:
		
							parent
							
								
									f8cf508b5f
								
							
						
					
					
						commit
						e3c077dd6d
					
				|  | @ -88402,12 +88402,17 @@ function cacheWindowsDir(extPath, tool, version, arch) { | |||
|         for (const cachePath of actualCacheDirectoryPaths) { | ||||
|             core.info(`Trying to link ${cachePath.defaultPath} to ${cachePath.actualPath}`); | ||||
|             try { | ||||
|                 if (!fs_1.default.existsSync(cachePath.defaultPath)) { | ||||
|                     core.info(`Default path ${cachePath.defaultPath} does not exist`); | ||||
|                     core.info(`Creating directory ${cachePath.defaultPath}`); | ||||
|                     fs_1.default.mkdirSync(cachePath.defaultPath, { recursive: true }); | ||||
|                 } | ||||
|                 if (!fs_1.default.existsSync(cachePath.actualPath)) { | ||||
|                     core.info(`Creating directory ${cachePath.actualPath}`); | ||||
|                     fs_1.default.mkdirSync(path.dirname(cachePath.actualPath), { recursive: true }); | ||||
|                     core.info(`Actual path ${cachePath.actualPath} does not exist. Safe to create symlink`); | ||||
|                 } | ||||
|                 else { | ||||
|                     core.info(`Directory ${cachePath.actualPath} already exists`); | ||||
|                     core.info(`Actual path ${cachePath.actualPath} already exists. Skipping symlink creation`); | ||||
|                     continue; | ||||
|                 } | ||||
|                 // check if the default path is a symlink
 | ||||
|                 const isSymlink = fs_1.default.lstatSync(cachePath.defaultPath).isSymbolicLink(); | ||||
|  |  | |||
|  | @ -236,11 +236,16 @@ async function cacheWindowsDir( | |||
|   for (const cachePath of actualCacheDirectoryPaths) { | ||||
|     core.info(`Trying to link ${cachePath.defaultPath} to ${cachePath.actualPath}`); | ||||
|     try { | ||||
|       if (!fs.existsSync(cachePath.defaultPath)) { | ||||
|         core.info(`Default path ${cachePath.defaultPath} does not exist`); | ||||
|         core.info(`Creating directory ${cachePath.defaultPath}`); | ||||
|         fs.mkdirSync(cachePath.defaultPath, {recursive: true}); | ||||
|       } | ||||
|       if (!fs.existsSync(cachePath.actualPath)) { | ||||
|         core.info(`Creating directory ${cachePath.actualPath}`); | ||||
|         fs.mkdirSync(path.dirname(cachePath.actualPath), {recursive: true}); | ||||
|         core.info(`Actual path ${cachePath.actualPath} does not exist. Safe to create symlink`); | ||||
|       } else { | ||||
|         core.info(`Directory ${cachePath.actualPath} already exists`); | ||||
|         core.info(`Actual path ${cachePath.actualPath} already exists. Skipping symlink creation`); | ||||
|         continue; | ||||
|       } | ||||
| 
 | ||||
|       // check if the default path is a symlink
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Anton Troshin
						Anton Troshin