logic update

This commit is contained in:
Aparna Jyothi 2025-06-09 13:02:08 +05:30
parent 08ee4fc403
commit b8efbc5bb0
2 changed files with 13 additions and 17 deletions

14
dist/setup/index.js vendored
View file

@ -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);

View file

@ -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}`
);
}
}