Skip to content

Commit b4dfea7

Browse files
fix: add back in working dir (#971)
1 parent 5bf2504 commit b4dfea7

File tree

5 files changed

+14
-1
lines changed

5 files changed

+14
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Codecov's Action supports inputs from the user. These inputs, along with their d
8686
| `url` | Change the upload host (Enterprise use) | Optional
8787
| `verbose` | Specify whether the Codecov output should be verbose | Optional
8888
| `version` | Specify which version of the Codecov Uploader should be used. Defaults to `latest` | Optional
89+
| `working-directory` | Directory in which to execute `codecov.sh` | Optional
8990
| `xtra_args` | Add additional uploader args that may be missing in the Action | Optional
9091

9192

action.yml

+3
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ inputs:
104104
version:
105105
description: 'Specify which version of the Codecov Uploader should be used. Defaults to `latest`'
106106
required: false
107+
working-directory:
108+
description: 'Directory in which to execute codecov.sh'
109+
required: false
107110
xcode:
108111
description: 'Run with xcode support'
109112
required: false

dist/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -22120,6 +22120,7 @@ const buildExec = () => {
2212022120
const upstream = core.getInput('upstream_proxy');
2212122121
const url = core.getInput('url');
2212222122
const verbose = isTrue(core.getInput('verbose'));
22123+
const workingDir = core.getInput('working-directory');
2212322124
const xcode = core.getInput('xcode');
2212422125
const xcodeArchivePath = core.getInput('xcode_archive_path');
2212522126
const xtraArgs = core.getInput('xtra_args');
@@ -22259,6 +22260,9 @@ const buildExec = () => {
2225922260
if (verbose) {
2226022261
console.debug({ execArgs });
2226122262
}
22263+
if (workingDir) {
22264+
options.cwd = workingDir;
22265+
}
2226222266
if (xtraArgs) {
2226322267
execArgs.push(`${xtraArgs}`);
2226422268
}

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/buildExec.ts

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const buildExec = () => {
5050
const upstream = core.getInput('upstream_proxy');
5151
const url = core.getInput('url');
5252
const verbose = isTrue(core.getInput('verbose'));
53+
const workingDir = core.getInput('working-directory');
5354
const xcode = core.getInput('xcode');
5455
const xcodeArchivePath = core.getInput('xcode_archive_path');
5556
const xtraArgs = core.getInput('xtra_args');
@@ -206,6 +207,10 @@ const buildExec = () => {
206207
console.debug({execArgs});
207208
}
208209

210+
if (workingDir) {
211+
options.cwd = workingDir;
212+
}
213+
209214
if (xtraArgs) {
210215
execArgs.push(`${xtraArgs}`);
211216
}

0 commit comments

Comments
 (0)