mirror of
https://github.com/codecov/codecov-action.git
synced 2026-04-13 09:30:05 +00:00
fix: see if file exists in js
This commit is contained in:
parent
12b28bf2fa
commit
03b5ef8e4e
4 changed files with 13 additions and 86 deletions
|
|
@ -25,6 +25,12 @@ try {
|
|||
const filename = path.join( __dirname, getUploaderName(platform));
|
||||
https.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
||||
// Image will be stored at this path
|
||||
|
||||
if (fs.existsSync(filename)) {
|
||||
core.info('IT EXISTS');
|
||||
} else {
|
||||
core.info('IT DOESNT EXIST');
|
||||
}
|
||||
const filePath = fs.createWriteStream(filename);
|
||||
res.pipe(filePath);
|
||||
filePath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue