From 63bc401d8ec1e165c7db5ba5ff95c9d5bfcb1e67 Mon Sep 17 00:00:00 2001 From: Huakun Shen Date: Mon, 27 Jan 2025 23:10:05 -0500 Subject: [PATCH] fix: system command filtering --- packages/api/src/commands/system.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/api/src/commands/system.ts b/packages/api/src/commands/system.ts index 64a4ceb..21e0be4 100644 --- a/packages/api/src/commands/system.ts +++ b/packages/api/src/commands/system.ts @@ -371,8 +371,9 @@ export const rawSystemCommands = [ ] export function getSystemCommands(): SysCommand[] { + const _platform = platform() return rawSystemCommands - .filter(async (cmd) => cmd.platforms.includes(platform())) // Filter out system commands that are not supported on the current platform + .filter((cmd) => cmd.platforms.includes(_platform)) // Filter out system commands that are not supported on the current platform .map((cmd) => ({ name: cmd.name, value: "system-cmd" + cmd.name.split(" ").join("-").toLowerCase(),