fix: try it on open

This commit is contained in:
Tom Hu 2023-11-10 08:16:03 +11:00
parent 935e9cbb3b
commit 80a3090424
No known key found for this signature in database
GPG key ID: 79155678363963D2
3 changed files with 10 additions and 5 deletions

6
dist/index.js vendored
View file

@ -24605,9 +24605,11 @@ try {
core.info('IT DOESNT EXIST');
}
const filePath = external_fs_.createWriteStream(filename);
res.pipe(filePath);
filePath
.on('error', (err) => {
.on('open', () => {
res.pipe(filePath);
}).on('error', (err) => {
core.info(`${external_fs_.existsSync(filename)}`);
core.info(`${console.trace()}`);
core.info(`Stack: ${err.stack}`);
setFailure(`Codecov:Failed to write uploader binary: ${err.message}\n${err}`, true);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -31,10 +31,13 @@ try {
} else {
core.info('IT DOESNT EXIST');
}
const filePath = fs.createWriteStream(filename);
res.pipe(filePath);
filePath
.on('error', (err) => {
.on('open', () => {
res.pipe(filePath);
}).on('error', (err) => {
core.info(`${fs.existsSync(filename)}`);
core.info(`${console.trace()}`);
core.info(`Stack: ${err.stack}`);
setFailure(