Skip to content

Commit

Permalink
fix file path
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Dec 4, 2023
1 parent 4f5c8db commit d1a6752
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/utils/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ const Util = {
readFile: async (filePath) => {
if (fs.existsSync(filePath)) {
const buf = await readFile(filePath).catch((e) => {
Util.logError(e.message || e);
Util.logError(`read file: ${filePath} ${e.message || e}`);
});
if (Buffer.isBuffer(buf)) {
return buf.toString('utf8');
Expand Down Expand Up @@ -247,7 +247,7 @@ const Util = {
}
}
await writeFile(filePath, content).catch((e) => {
Util.logError(e.message || e);
Util.logError(`write file: ${filePath} ${e.message || e}`);
});
},

Expand Down
4 changes: 2 additions & 2 deletions lib/v8/v8.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ const saveV8HtmlReport = async (reportData, _options) => {

// deps
const jsFiles = ['monocart-code-viewer', 'monocart-formatter', 'turbogrid'].map((it) => {
return path.resolve(__dirname, `../../node_modules/${it}/dist/${it}.js`);
return path.resolve(`node_modules/${it}/dist/${it}.js`);
});

// package v8 ui
jsFiles.push(path.resolve(__dirname, '../packages/monocart-coverage-v8.js'));
jsFiles.push(path.resolve('lib/packages/monocart-coverage-v8.js'));

// console.log(jsFiles);

Expand Down

0 comments on commit d1a6752

Please sign in to comment.