Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactored the code
  • Loading branch information
aparnajyothi-y committed Jun 19, 2025
commit 6d7172dabe9cbbe2ca951c523a331d600f62ac3c
8 changes: 4 additions & 4 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96947,14 +96947,14 @@ function cacheDependencies(cache, pythonVersion) {
// Copy file asynchronously
yield fs_1.default.promises.copyFile(sourcePath, targetPath);
core.info(`Copied ${sourcePath} to ${targetPath}`);
resolvedDependencyPath = path
.relative(workspace, targetPath)
.replace(/\\/g, '/');
core.info(`Resolved cache-dependency-path: ${resolvedDependencyPath}`);
}
else {
core.info(`Dependency file is already inside the workspace: ${sourcePath}`);
}
resolvedDependencyPath = path
.relative(workspace, targetPath)
.replace(/\\/g, '/');
core.info(`Resolved cache-dependency-path: ${resolvedDependencyPath}`);
}
}
catch (error) {
Expand Down
12 changes: 7 additions & 5 deletions src/setup-python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,18 @@ export async function cacheDependencies(cache: string, pythonVersion: string) {
// Copy file asynchronously
await fs.promises.copyFile(sourcePath, targetPath);
core.info(`Copied ${sourcePath} to ${targetPath}`);

resolvedDependencyPath = path
.relative(workspace, targetPath)
.replace(/\\/g, '/');
core.info(
`Resolved cache-dependency-path: ${resolvedDependencyPath}`
);
} else {
core.info(
`Dependency file is already inside the workspace: ${sourcePath}`
);
}

resolvedDependencyPath = path
.relative(workspace, targetPath)
.replace(/\\/g, '/');
core.info(`Resolved cache-dependency-path: ${resolvedDependencyPath}`);
}
} catch (error) {
core.warning(
Expand Down
Loading