fix: see if file exists in js

This commit is contained in:
Tom Hu 2023-11-10 08:06:54 +11:00
parent 12b28bf2fa
commit 03b5ef8e4e
No known key found for this signature in database
GPG key ID: 79155678363963D2
4 changed files with 13 additions and 86 deletions

6
dist/index.js vendored
View file

@ -24598,6 +24598,12 @@ try {
const filename = external_path_.join(__dirname, getUploaderName(platform));
external_https_.get(getBaseUrl(platform, uploaderVersion), (res) => {
// Image will be stored at this path
if (external_fs_.existsSync(filename)) {
core.info('IT EXISTS');
}
else {
core.info('IT DOESNT EXIST');
}
const filePath = external_fs_.createWriteStream(filename);
res.pipe(filePath);
filePath

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long