Skip to content

Commit

Permalink
fix: add back in working dir (#971)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu-codecov committed May 3, 2023
1 parent 5bf2504 commit b4dfea7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -86,6 +86,7 @@ Codecov's Action supports inputs from the user. These inputs, along with their d
| `url` | Change the upload host (Enterprise use) | Optional
| `verbose` | Specify whether the Codecov output should be verbose | Optional
| `version` | Specify which version of the Codecov Uploader should be used. Defaults to `latest` | Optional
| `working-directory` | Directory in which to execute `codecov.sh` | Optional
| `xtra_args` | Add additional uploader args that may be missing in the Action | Optional


Expand Down
3 changes: 3 additions & 0 deletions action.yml
Expand Up @@ -104,6 +104,9 @@ inputs:
version:
description: 'Specify which version of the Codecov Uploader should be used. Defaults to `latest`'
required: false
working-directory:
description: 'Directory in which to execute codecov.sh'
required: false
xcode:
description: 'Run with xcode support'
required: false
Expand Down
4 changes: 4 additions & 0 deletions dist/index.js
Expand Up @@ -22120,6 +22120,7 @@ const buildExec = () => {
const upstream = core.getInput('upstream_proxy');
const url = core.getInput('url');
const verbose = isTrue(core.getInput('verbose'));
const workingDir = core.getInput('working-directory');
const xcode = core.getInput('xcode');
const xcodeArchivePath = core.getInput('xcode_archive_path');
const xtraArgs = core.getInput('xtra_args');
Expand Down Expand Up @@ -22259,6 +22260,9 @@ const buildExec = () => {
if (verbose) {
console.debug({ execArgs });
}
if (workingDir) {
options.cwd = workingDir;
}
if (xtraArgs) {
execArgs.push(`${xtraArgs}`);
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/buildExec.ts
Expand Up @@ -50,6 +50,7 @@ const buildExec = () => {
const upstream = core.getInput('upstream_proxy');
const url = core.getInput('url');
const verbose = isTrue(core.getInput('verbose'));
const workingDir = core.getInput('working-directory');
const xcode = core.getInput('xcode');
const xcodeArchivePath = core.getInput('xcode_archive_path');
const xtraArgs = core.getInput('xtra_args');
Expand Down Expand Up @@ -206,6 +207,10 @@ const buildExec = () => {
console.debug({execArgs});
}

if (workingDir) {
options.cwd = workingDir;
}

if (xtraArgs) {
execArgs.push(`${xtraArgs}`);
}
Expand Down

0 comments on commit b4dfea7

Please sign in to comment.