Skip to content

Commit

Permalink
Use path.resolve instead of path.join for sourceRoot
Browse files Browse the repository at this point in the history
Thanks to @aibaars, `path.resolve()` should will nicely handle more use-cases, namely absolute paths better than `path.join()`.

Co-authored-by: Arthur Baars <aibaars@github.com>
  • Loading branch information
2 people authored and GitHub committed Jun 30, 2021
1 parent 66df091 commit 35e1b55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/init-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ async function run() {
const codeqlRam = process.env["CODEQL_RAM"] || "6500";
core.exportVariable("CODEQL_RAM", codeqlRam);

const sourceRoot = path.join(
const sourceRoot = path.resolve(
getRequiredEnvParam("GITHUB_WORKSPACE"),
getOptionalInput("source-root") || ""
);
Expand Down

0 comments on commit 35e1b55

Please sign in to comment.