Skip to content

Commit 4117319

Browse files
committed
Fix outdir
1 parent 921ffc2 commit 4117319

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/tsgo/main.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,13 @@ func main() {
6363

6464
rootPath := flag.Arg(0)
6565
compilerOptions := &core.CompilerOptions{Strict: core.TSTrue, Target: core.ScriptTargetESNext, ModuleKind: core.ModuleKindNodeNext, NoEmit: core.TSTrue}
66+
67+
currentDirectory, err := os.Getwd()
6668
if len(outDir) > 0 {
6769
compilerOptions.NoEmit = core.TSFalse
68-
compilerOptions.OutDir = outDir
70+
compilerOptions.OutDir = tspath.ResolvePath(currentDirectory, outDir)
6971
}
7072

71-
currentDirectory, err := os.Getwd()
7273
if err != nil {
7374
fmt.Fprintf(os.Stderr, "Error getting current directory: %v\n", err)
7475
os.Exit(1)

0 commit comments

Comments
 (0)