diff --git a/dist/setup/index.js b/dist/setup/index.js index 694147e8..4da6c476 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -96934,14 +96934,12 @@ function cacheDependencies(cache, pythonVersion) { core.warning(`The resolved cache-dependency-path does not exist: ${sourcePath}`); } else { - if (sourcePath !== targetPath) { - try { - fs_1.default.copyFileSync(sourcePath, targetPath); - core.info(`Copied ${sourcePath} to ${targetPath}`); - } - catch (error) { - core.warning(`Failed to copy file from ${sourcePath} to ${targetPath}: ${error}`); - } + try { + fs_1.default.copyFileSync(sourcePath, targetPath); + core.info(`Copied ${sourcePath} to ${targetPath}`); + } + catch (error) { + core.warning(`Failed to copy file from ${sourcePath} to ${targetPath}: ${error}`); } } resolvedDependencyPath = path.relative(workspace, targetPath); diff --git a/src/setup-python.ts b/src/setup-python.ts index c2665bfa..e5a5c6e7 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -42,15 +42,13 @@ export async function cacheDependencies(cache: string, pythonVersion: string) { `The resolved cache-dependency-path does not exist: ${sourcePath}` ); } else { - if (sourcePath !== targetPath) { - try { - fs.copyFileSync(sourcePath, targetPath); - core.info(`Copied ${sourcePath} to ${targetPath}`); - } catch (error) { - core.warning( - `Failed to copy file from ${sourcePath} to ${targetPath}: ${error}` - ); - } + try { + fs.copyFileSync(sourcePath, targetPath); + core.info(`Copied ${sourcePath} to ${targetPath}`); + } catch (error) { + core.warning( + `Failed to copy file from ${sourcePath} to ${targetPath}: ${error}` + ); } }