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

3
dist/index.js vendored
View file

@ -24598,7 +24598,7 @@ try {
const filename = external_path_.join(__dirname, getUploaderName(platform));
core.info(`filename: ${filename}`);
external_https_.get(getBaseUrl(platform, uploaderVersion), (res) => {
const filePath = external_fs_.createWriteStream(filename);
const filePath = external_fs_.createWriteStream(filename, { flags: 'w' });
filePath
.on('open', () => {
if (external_fs_.existsSync(filename)) {
@ -24607,6 +24607,7 @@ try {
else {
core.info('IT DOESNT EXIST open');
}
res.pipe(filePath);
if (external_fs_.existsSync(filename)) {
core.info('IT EXISTS pipe');
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

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 {