fix: do we have perms

This commit is contained in:
Tom Hu 2023-11-10 11:06:36 +11:00
parent 90984294e9
commit 317f2b788d
No known key found for this signature in database
GPG key ID: 79155678363963D2
3 changed files with 31 additions and 1 deletions

View file

@ -26,6 +26,20 @@ try {
fs.access(filename, fs.constants.W_OK, (err) => {
core.info(`${filename} ${err ? 'is not writable' : 'is writable'}`);
});
fs.access(__dirname, fs.constants.R_OK, function(err) {
if (err) {
core.info('cant read');
} else {
core.info('can read');
}
});
fs.access(__dirname, fs.constants.W_OK, function(err) {
if (err) {
core.info('cant write');
} else {
core.info('can write');
}
});
core.info(`filename: ${filename}`);
https.get(getBaseUrl(platform, uploaderVersion), (res) => {