From 35e1b55411b8ba6fed21e9883bf67591e7860eae Mon Sep 17 00:00:00 2001 From: Mario Campos <mario-campos@github.com> Date: Wed, 30 Jun 2021 12:34:12 -0500 Subject: [PATCH] Use path.resolve instead of path.join for sourceRoot 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> --- src/init-action.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init-action.ts b/src/init-action.ts index 15680a7ce..3c16d9c59 100644 --- a/src/init-action.ts +++ b/src/init-action.ts @@ -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") || "" );