Skip to content

Commit 36e865d

Browse files
committed
fix(get-package-manager): make cache path absolute when pointing to parent folder
Signed-off-by: Emilien Escalle <[email protected]>
1 parent e79d55c commit 36e865d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

actions/get-package-manager/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ runs:
9090
core.debug(`Package manager from lock files: ${packageManagerName}`);
9191
}
9292
93-
const relativeWorkingDirectory = path.relative(process.env.GITHUB_WORKSPACE, workingDirectory) || '.';
93+
let relativeWorkingDirectory = path.relative(process.env.GITHUB_WORKSPACE, workingDirectory) || '.';
94+
if (relativeWorkingDirectory.startsWith('../')) {
95+
relativeWorkingDirectory = path.resolve(workingDirectory);
96+
}
9497
9598
const packageManagerConfig = {
9699
yarn: {

0 commit comments

Comments
 (0)