mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
fix logic
This commit is contained in:
8
index.js
8
index.js
@@ -32,7 +32,7 @@ try {
|
|||||||
myError += data.toString();
|
myError += data.toString();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
options.env = {
|
options.env = {
|
||||||
CODECOV_TOKEN: `${token}`,
|
CODECOV_TOKEN: `${token}`,
|
||||||
GITHUB_ACTION: process.env.GITHUB_ACTION,
|
GITHUB_ACTION: process.env.GITHUB_ACTION,
|
||||||
@@ -41,10 +41,10 @@ try {
|
|||||||
GITHUB_SHA: process.env.GITHUB_SHA
|
GITHUB_SHA: process.env.GITHUB_SHA
|
||||||
};
|
};
|
||||||
|
|
||||||
if (file === '' ){
|
if (file){
|
||||||
exec.exec('bash', ['codecov.sh', '-f', `${file}`, '-n', `${name}`, '-F', `${flags}`, ], options);
|
exec.exec('bash', ['codecov.sh', '-f', `${file}`, '-n', `${name}`, '-F', `${flags}`], options);
|
||||||
}else{
|
}else{
|
||||||
exec.exec('bash', ['codecov.sh', `${name}`, '-F', `${flags}`, ], options);
|
exec.exec('bash', ['codecov.sh','-n', `${name}`, '-F', `${flags}`], options);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user