diff --git a/README.md b/README.md index 9a129fb..b3d0388 100644 --- a/README.md +++ b/README.md @@ -24,5 +24,7 @@ The Scope Import tool is compatible with the following test reports: uses: undefinedlabs/scope-import-action@v1 with: dsn: ${{ secrets.SCOPE_DSN }} - path: path/to/test-reports + path: | + path/to/test-reports01 + path/to/test-reports02 ``` diff --git a/dist/index.js b/dist/index.js index 686b907..fa67d00 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1686,7 +1686,7 @@ function run() { try { let dsn = core.getInput("dsn", { required: true }); yield core.exportVariable("SCOPE_DSN", dsn); - let pathVar = core.getInput("path", { required: true }); + const pathVar = core.getInput("path", { required: true }).replace(/[\r\n]/gm, " "); const platform = IS_WINDOWS ? "windows" : IS_MACOS ? "darwin" : "linux"; let scopeImportToolPath; scopeImportToolPath = yield tc.downloadTool("https://home.undefinedlabs.com/download/scope-import/" + @@ -1699,7 +1699,7 @@ function run() { else { yield exec.exec("chmod +x " + scopeImportToolPath); } - yield exec.exec(scopeImportToolPath + " --path " + pathVar); + yield exec.exec(scopeImportToolPath + " " + pathVar); } catch (error) { core.setFailed(error.message); diff --git a/src/scope-import.ts b/src/scope-import.ts index f528d8c..fb07b15 100644 --- a/src/scope-import.ts +++ b/src/scope-import.ts @@ -12,7 +12,7 @@ async function run() { let dsn = core.getInput("dsn", { required: true }); await core.exportVariable("SCOPE_DSN", dsn); - let pathVar = core.getInput("path", { required: true }); + const pathVar = core.getInput("path", { required: true }).replace(/[\r\n]/gm, " "); const platform = IS_WINDOWS ? "windows" : IS_MACOS ? "darwin" : "linux"; let scopeImportToolPath; @@ -27,7 +27,7 @@ async function run() { } else { await exec.exec("chmod +x " + scopeImportToolPath); } - await exec.exec(scopeImportToolPath + " --path " + pathVar); + await exec.exec(scopeImportToolPath + " " + pathVar); } catch (error) { core.setFailed(error.message); }