From 55dde41e2b7a0e47e51b58bc7b69f1386b95cf71 Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Wed, 12 Aug 2020 23:31:42 +0200 Subject: [PATCH] Add "working-directory:" setting --- action.yml | 3 +++ index.js | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/action.yml b/action.yml index fb6c391..106a666 100644 --- a/action.yml +++ b/action.yml @@ -32,6 +32,9 @@ inputs: verbose: description: 'Specify whether the Codecov output should be verbose' required: false + working-directory: + description: 'Directory in which to execute codecov.sh' + required: false branding: color: 'red' icon: 'umbrella' diff --git a/index.js b/index.js index 58cef7a..2aea6a8 100644 --- a/index.js +++ b/index.js @@ -14,6 +14,7 @@ try { const dir = core.getInput("directory"); const write_path = core.getInput("path_to_write_report"); const verbose = core.getInput("verbose"); + const working_dir = core.getInput("working-directory"); const xcode_derived_data = core.getInput("xcode_derived_data"); const xcode_package = core.getInput("xcode_package"); @@ -137,6 +138,10 @@ try { ); } + if (working_dir) { + options.cwd = working_dir; + } + if (xcode_derived_data) { execArgs.push( "-D", `${xcode_derived_data}`