Skip to content

Commit 61ae18e

Browse files
committed
fix(ci): use absolute path in print-config --output file
1 parent 1908892 commit 61ae18e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/ci/src/lib/cli/commands/print-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ export async function runPrintConfig({
1717
}: CommandContext): Promise<unknown> {
1818
// random file name so command can be run in parallel
1919
const outputFile = `code-pushup.${generateRandomId()}.config.json`;
20-
const outputPath = path.join(directory, outputFile);
20+
const outputPath = path.resolve(directory, outputFile);
2121

2222
await executeProcess({
2323
command: bin,
2424
args: [
2525
...(config ? [`--config=${config}`] : []),
2626
'print-config',
2727
...(isVerbose() ? ['--verbose'] : []),
28-
`--output=${outputFile}`,
28+
`--output=${outputPath}`,
2929
],
3030
cwd: directory,
3131
observer,

packages/ci/src/lib/run.integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ describe('runInCI', () => {
132132
?.find(arg => arg.startsWith('--output='))
133133
?.split('=')[1];
134134
if (outputFile) {
135-
await writeFile(path.join(cwd as string, outputFile), content);
135+
await writeFile(path.resolve(cwd as string, outputFile), content);
136136
} else {
137137
stdout = content;
138138
}

0 commit comments

Comments
 (0)