Skip to content

Incorrect path normalization in TSTL.ts #736

@DoctorGester

Description

@DoctorGester

Reproduces for me on windows, execute following commands in cmd

mkdir tstl-bug-repro
cd tstl-bug-repro
npm init -yes
npm install -S typescript-to-lua
npm install -S typescript
npm install -S npx

git clone https://github.com/Perryvw/ExampleTSDotaAddon.git

REM Verify that tsconfig is present
type ExampleTSDotaAddon\game\scripts\tsconfig.json

REM Outputs a bunch of errors for me, that's ok
npx tsc -p ../tstl-bug-repro/ExampleTSDotaAddon/game/scripts/tsconfig.json

REM Outputs 'The specified path does not exist'
npx tstl -p ../tstl-bug-repro/ExampleTSDotaAddon/game/scripts/tsconfig.json

This seems to be caused by using posix.normalize when figuring out the tsconfig path in TSTL.ts

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