mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-09 20:47:26 +00:00
fix: do we have perms
This commit is contained in:
parent
90984294e9
commit
317f2b788d
3 changed files with 31 additions and 1 deletions
16
dist/index.js
vendored
16
dist/index.js
vendored
|
|
@ -24599,6 +24599,22 @@ try {
|
|||
external_fs_.access(filename, external_fs_.constants.W_OK, (err) => {
|
||||
core.info(`${filename} ${err ? 'is not writable' : 'is writable'}`);
|
||||
});
|
||||
external_fs_.access(__dirname, external_fs_.constants.R_OK, function (err) {
|
||||
if (err) {
|
||||
core.info('cant read');
|
||||
}
|
||||
else {
|
||||
core.info('can read');
|
||||
}
|
||||
});
|
||||
external_fs_.access(__dirname, external_fs_.constants.W_OK, function (err) {
|
||||
if (err) {
|
||||
core.info('cant write');
|
||||
}
|
||||
else {
|
||||
core.info('can write');
|
||||
}
|
||||
});
|
||||
core.info(`filename: ${filename}`);
|
||||
external_https_.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
||||
const filePath = external_fs_.createWriteStream(filename, { flags: 'w' });
|
||||
|
|
|
|||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
14
src/index.ts
14
src/index.ts
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue