Skip to content

Commit

Permalink
fix(cli): parseTemplatePath doesn't work in windows (#5339)
Browse files Browse the repository at this point in the history
* fix(cli) parseTemplatePath doesn't work in windows

* refactor use path.sep

---------

Co-authored-by: Yale <yale.yu@kuka.com>
  • Loading branch information
yuyidegit and Yale-Yu-art committed Oct 26, 2023
1 parent ae23dbc commit a07c3cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/qwik/src/cli/utils/templates.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'node:fs';
import { join } from 'node:path';
import { join, sep } from 'node:path';
import type { TemplateSet } from '../types';
import { getFilesDeep } from './utils';

Expand Down Expand Up @@ -58,7 +58,7 @@ export async function readTemplates(rootDir: string) {
}

function parseTemplatePath(path: string, type: string) {
const parts = path.split(`/${type}/`);
const parts = path.split(sep + type + sep);

return {
absolute: path,
Expand Down

0 comments on commit a07c3cd

Please sign in to comment.