Skip to content

Commit

Permalink
chore: daily development
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Dec 24, 2024
1 parent 01cae73 commit 6d5aa54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/canyon-uploader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "canyon-uploader",
"version": "0.0.1-beta.28",
"version": "0.0.1-beta.29",
"files": [
"bin",
"dist"
Expand Down
10 changes: 6 additions & 4 deletions tools/canyon-uploader/src/commands/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@ export async function mapCommand(params, options) {
sha,
instrument_cwd: instrumentCwd,
branch,
provider
provider,
workspace,
} = params;
const realWorkspace = workspace || process.cwd();
// 判断是否存在.canyon_output文件夹
if (!fs.existsSync(path.resolve(process.cwd(), ".canyon_output"))) {
if (!fs.existsSync(path.resolve(realWorkspace, ".canyon_output"))) {
console.error("No coverage data found in .canyon_output");
return;
}

const files = fs.readdirSync(path.resolve(process.cwd(), ".canyon_output"));
const files = fs.readdirSync(path.resolve(realWorkspace, ".canyon_output"));
if (files.length === 0) {
console.error("No coverage data found in .canyon_output");
return;
}
let data = {};
for (let i = 0; i < files.length; i++) {
const fileCoverageString = fs.readFileSync(
path.resolve(process.cwd(), ".canyon_output", files[i]),
path.resolve(realWorkspace, ".canyon_output", files[i]),
"utf-8",
);
data = {
Expand Down

0 comments on commit 6d5aa54

Please sign in to comment.