From 061ffc94d1548235e340072302594aaa7ae9a742 Mon Sep 17 00:00:00 2001 From: caorushizi <84996057@qq.com> Date: Thu, 19 Dec 2024 20:39:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=20windows=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/build.ts | 4 ++++ scripts/check.ts | 4 ++++ scripts/dev.ts | 4 ++++ scripts/pre-commit.ts | 4 ++++ scripts/web.ts | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/scripts/build.ts b/scripts/build.ts index e50f26f..d975926 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -1,6 +1,10 @@ #!/usr/bin/env zx import { echo, $ } from "zx"; $.verbose = true; +if (process.platform === "win32") { + $.prefix = ""; + $.shell = "pwsh.exe"; +} echo("开始构建 production ..."); echo("当前所在的目录是:", process.cwd()); diff --git a/scripts/check.ts b/scripts/check.ts index 0f9f6cc..8b983cb 100644 --- a/scripts/check.ts +++ b/scripts/check.ts @@ -3,6 +3,10 @@ import { $, echo } from "zx"; import type { ProcessOutput } from "zx"; import { printObject } from "./utils"; $.verbose = true; +if (process.platform === "win32") { + $.prefix = ""; + $.shell = "pwsh.exe"; +} echo("开始执行代码质量评估...\n"); diff --git a/scripts/dev.ts b/scripts/dev.ts index 594860c..18b6f68 100644 --- a/scripts/dev.ts +++ b/scripts/dev.ts @@ -1,6 +1,10 @@ #!/usr/bin/env zx import { echo, $ } from "zx"; $.verbose = true; +if (process.platform === "win32") { + $.prefix = ""; + $.shell = "pwsh.exe"; +} echo("开始构建 development ..."); echo("当前所在的目录是:", process.cwd()); diff --git a/scripts/pre-commit.ts b/scripts/pre-commit.ts index a537c35..131d6a6 100644 --- a/scripts/pre-commit.ts +++ b/scripts/pre-commit.ts @@ -1,6 +1,10 @@ #!/usr/bin/env zx import { $, echo } from "zx"; $.verbose = true; +if (process.platform === "win32") { + $.prefix = ""; + $.shell = "pwsh.exe"; +} echo("开始执行代码质量评估...\n"); diff --git a/scripts/web.ts b/scripts/web.ts index e532403..0c4e76e 100644 --- a/scripts/web.ts +++ b/scripts/web.ts @@ -2,6 +2,10 @@ import { echo, $ } from "zx"; $.verbose = true; +if (process.platform === "win32") { + $.prefix = ""; + $.shell = "pwsh.exe"; +} echo("开始构建 production ..."); echo("当前所在的目录是:", process.cwd());