mirror of
https://github.com/actions/setup-python.git
synced 2025-08-27 03:04:14 +00:00
logic update
This commit is contained in:
parent
08ee4fc403
commit
b8efbc5bb0
14
dist/setup/index.js
vendored
14
dist/setup/index.js
vendored
@ -96934,14 +96934,12 @@ function cacheDependencies(cache, pythonVersion) {
|
|||||||
core.warning(`The resolved cache-dependency-path does not exist: ${sourcePath}`);
|
core.warning(`The resolved cache-dependency-path does not exist: ${sourcePath}`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (sourcePath !== targetPath) {
|
try {
|
||||||
try {
|
fs_1.default.copyFileSync(sourcePath, targetPath);
|
||||||
fs_1.default.copyFileSync(sourcePath, targetPath);
|
core.info(`Copied ${sourcePath} to ${targetPath}`);
|
||||||
core.info(`Copied ${sourcePath} to ${targetPath}`);
|
}
|
||||||
}
|
catch (error) {
|
||||||
catch (error) {
|
core.warning(`Failed to copy file from ${sourcePath} to ${targetPath}: ${error}`);
|
||||||
core.warning(`Failed to copy file from ${sourcePath} to ${targetPath}: ${error}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resolvedDependencyPath = path.relative(workspace, targetPath);
|
resolvedDependencyPath = path.relative(workspace, targetPath);
|
||||||
|
@ -42,15 +42,13 @@ export async function cacheDependencies(cache: string, pythonVersion: string) {
|
|||||||
`The resolved cache-dependency-path does not exist: ${sourcePath}`
|
`The resolved cache-dependency-path does not exist: ${sourcePath}`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if (sourcePath !== targetPath) {
|
try {
|
||||||
try {
|
fs.copyFileSync(sourcePath, targetPath);
|
||||||
fs.copyFileSync(sourcePath, targetPath);
|
core.info(`Copied ${sourcePath} to ${targetPath}`);
|
||||||
core.info(`Copied ${sourcePath} to ${targetPath}`);
|
} catch (error) {
|
||||||
} catch (error) {
|
core.warning(
|
||||||
core.warning(
|
`Failed to copy file from ${sourcePath} to ${targetPath}: ${error}`
|
||||||
`Failed to copy file from ${sourcePath} to ${targetPath}: ${error}`
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user