Skip to content

Commit c740c91

Browse files
Ws/visual reporter fix cli paths (#606)
* fix: fix using relative paths * chore: add changeset
1 parent 24d1470 commit c740c91

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/thick-llamas-repair.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@wdio/visual-reporter": patch
3+
---
4+
5+
fix paths for cli

packages/visual-reporter/scripts/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import { copyDirectory } from './utils/fileHandling.js'
1414
async function main() {
1515
//
1616
// Set some initial variables
17-
let filePath = getArgValue('--jsonOutput')
18-
let reportPath = getArgValue('--reportFolder')
17+
const filePath = getArgValue('--jsonOutput') ? resolve(process.cwd(), getArgValue('--jsonOutput')) : undefined
18+
const reportPath = getArgValue('--reportFolder') ? resolve(process.cwd(), getArgValue('--reportFolder')) : undefined
1919
const logLevel = getArgValue('--logLevel')
2020
const __filename = fileURLToPath(import.meta.url)
2121
const __dirname = dirname(__filename)

0 commit comments

Comments
 (0)