mirror of
https://github.com/codecov/codecov-action.git
synced 2026-04-12 17:10:05 +00:00
filesync
This commit is contained in:
parent
ef56160684
commit
1c3c14b66e
2 changed files with 21 additions and 27 deletions
25
src/index.ts
25
src/index.ts
|
|
@ -18,25 +18,22 @@ try {
|
|||
'Codecov: Could not properly download uploader binary: ' +
|
||||
`${err.message}`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
fs.writeFileSync(filename, body);
|
||||
fs.chmodSync(filename, '777');
|
||||
if (fs.existsSync(filename)) {
|
||||
console.log('file exists');
|
||||
} else {
|
||||
console.log('file does not exist');
|
||||
}
|
||||
console.log(fs.statSync(filename));
|
||||
|
||||
childProcess.execFile(filename, (err) => {
|
||||
if (err) {
|
||||
core.setFailed(
|
||||
'Codecov: Failed to properly upload: ' +
|
||||
`${err.message}`,
|
||||
);
|
||||
}
|
||||
try {
|
||||
childProcess.execFileSync(filename);
|
||||
console.log('finished!');
|
||||
});
|
||||
} catch (err) {
|
||||
core.setFailed(
|
||||
'Codecov: Failed to properly upload: ' +
|
||||
`${err.message}`,
|
||||
);
|
||||
return;
|
||||
};
|
||||
});
|
||||
} catch (err) {
|
||||
core.setFailed(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue