Skip to content

Commit dcafe09

Browse files
committed
fix: copy the merge result file out of the temp directory, instead of trying to move it
see: #58 (comment)
1 parent bc13f5c commit dcafe09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/lcov-result-merger.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22
const fastGlob = require('fast-glob');
3-
const { rename, readFile } = require('node:fs/promises');
3+
const { copyFile, readFile } = require('node:fs/promises');
44
const { mergeCoverageReportFiles } = require('../index');
55
const yargs = require('yargs/yargs');
66
const { hideBin } = require('yargs/helpers');
@@ -63,7 +63,7 @@ const args = yargs(hideBin(process.argv)).command(
6363
const tempFilePath = await mergeCoverageReportFiles(files, args);
6464

6565
if (args.outFile) {
66-
await rename(tempFilePath, args.outFile);
66+
await copyFile(tempFilePath, args.outFile);
6767
} else {
6868
process.stdout.write(await readFile(tempFilePath, 'utf-8'));
6969
}

0 commit comments

Comments
 (0)