mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-04-11 17:29:44 +00:00
fix: system command filtering
This commit is contained in:
parent
b7b81013ba
commit
63bc401d8e
@ -371,8 +371,9 @@ export const rawSystemCommands = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export function getSystemCommands(): SysCommand[] {
|
export function getSystemCommands(): SysCommand[] {
|
||||||
|
const _platform = platform()
|
||||||
return rawSystemCommands
|
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) => ({
|
.map((cmd) => ({
|
||||||
name: cmd.name,
|
name: cmd.name,
|
||||||
value: "system-cmd" + cmd.name.split(" ").join("-").toLowerCase(),
|
value: "system-cmd" + cmd.name.split(" ").join("-").toLowerCase(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user