Skip to content

Commit 42499d5

Browse files
committed
fix: windows dot-files
1 parent 654cbaa commit 42499d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/cta-engine/src/template-file.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { resolve } from 'node:path'
1+
import { resolve, sep } from 'node:path'
22
import { render } from 'ejs'
33
import { format } from 'prettier'
44

@@ -14,9 +14,9 @@ import type { AddOn, Environment, Options } from './types.js'
1414

1515
function convertDotFilesAndPaths(path: string) {
1616
return path
17-
.split('/')
17+
.split(sep)
1818
.map((segment) => segment.replace(/^_dot_/, '.'))
19-
.join('/')
19+
.join(sep)
2020
}
2121

2222
export function createTemplateFile(environment: Environment, options: Options) {

0 commit comments

Comments
 (0)