Skip to content

Commit

Permalink
Merge pull request #223 from PyO3/absolute-workdir
Browse files Browse the repository at this point in the history
Allow absolute `working-directory`
  • Loading branch information
messense authored Oct 26, 2023
2 parents ff518a8 + fec6347 commit 0ddcb8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11500,7 +11500,9 @@ function getWorkingDirectory() {
const workspace = process.env.GITHUB_WORKSPACE;
let workdir = core.getInput('working-directory');
if (workdir.length > 0) {
workdir = path.join(workspace, workdir);
if (!path.isAbsolute(workdir)) {
workdir = path.join(workspace, workdir);
}
}
else {
workdir = workspace;
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ function getWorkingDirectory(): string {
const workspace = process.env.GITHUB_WORKSPACE!
let workdir = core.getInput('working-directory')
if (workdir.length > 0) {
workdir = path.join(workspace, workdir)
if (!path.isAbsolute(workdir)) {
workdir = path.join(workspace, workdir)
}
} else {
workdir = workspace
}
Expand Down

0 comments on commit 0ddcb8d

Please sign in to comment.