Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Commit

Permalink
fix(pluggable-widgets-tools): wrap spaced folders on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Wesley committed Oct 12, 2021
1 parent 16f9a9e commit ddcf07a
Showing 1 changed file with 6 additions and 1 deletion.
@@ -1,4 +1,5 @@
import { promises as fs } from "fs";
import { platform } from "os";
import { extname, join } from "path";
import { listDir, execShellCommand } from "./shared";

Expand Down Expand Up @@ -26,7 +27,11 @@ export function widgetTyping({ sourceDir }) {
}
await execShellCommand(
`npx pluggable-widgets-tools format:custom-files -- ${propsTypingFilePaths
.map(f => `'"${f}"'`)
.map(f =>
platform() === "win32"
? `'${f.replace(/(?<=[/\\])([^/\\]* [^/\\]*)(?=[/\\])/g, '"$1"')}'`
: `'"${f}"'`
)
.join(" ")}`,
sourceDir
);
Expand Down

0 comments on commit ddcf07a

Please sign in to comment.