Skip to content

Windows platform, parseStack function didn't work as expected #225

Open
@13OnTheCode

Description

@13OnTheCode

Environment

System:
OS: Windows 10 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
Memory: 15.60 GB / 31.94 GB

Binaries:
Node: 20.5.0 - ~\AppData\Local\pnpm\node.EXE
npm: 9.8.0 - ~\AppData\Local\pnpm\npm.CMD
pnpm: 8.6.12 - ~\AppData\Local\pnpm\pnpm.EXE

npmPackages:
consola: ^3.2.3 => 3.2.3

Reproduction

import { consola } from 'consola'

consola.error(new Error('test'))

result:
微信截图_20230814161705

expected:
微信截图_20230814161811

Describe the bug

The issue is likely caused by the Windows path separator, and the function doesn't handle it properly, resulting in it not working correctly on the Windows platform.

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions