fix: explicit w

This commit is contained in:
Tom Hu 2023-11-10 10:56:07 +11:00
parent b006eac6db
commit 0691fc76df
No known key found for this signature in database
GPG key ID: 79155678363963D2
3 changed files with 5 additions and 4 deletions

View file

@ -26,7 +26,7 @@ try {
core.info(`filename: ${filename}`);
https.get(getBaseUrl(platform, uploaderVersion), (res) => {
const filePath = fs.createWriteStream(filename);
const filePath = fs.createWriteStream(filename, {flags: 'w'});
filePath
.on('open', () => {
if (fs.existsSync(filename)) {
@ -34,7 +34,7 @@ try {
} else {
core.info('IT DOESNT EXIST open');
}
res.pipe(filePath);
if (fs.existsSync(filename)) {
core.info('IT EXISTS pipe');
} else {