diff --git a/dist/index.js b/dist/index.js index 01bef6e..df69bbd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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; diff --git a/src/index.ts b/src/index.ts index 846bcc2..8a124e8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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 }