From 76e5f5f925758c4ed4f6f09b5200942bb7ee8673 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Wed, 28 Sep 2022 19:15:33 -0400 Subject: [PATCH] fix(striker-ui-api): add date to shell --- striker-ui-api/src/lib/consts/SERVER_PATHS.ts | 1 + striker-ui-api/src/lib/shell.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/striker-ui-api/src/lib/consts/SERVER_PATHS.ts b/striker-ui-api/src/lib/consts/SERVER_PATHS.ts index aa918960..f5cb357f 100644 --- a/striker-ui-api/src/lib/consts/SERVER_PATHS.ts +++ b/striker-ui-api/src/lib/consts/SERVER_PATHS.ts @@ -9,6 +9,7 @@ const EMPTY_SERVER_PATHS: ServerPath = { tmp: {}, usr: { bin: { + date: {}, mkfifo: {}, rm: {}, sed: {}, diff --git a/striker-ui-api/src/lib/shell.ts b/striker-ui-api/src/lib/shell.ts index 5ffdd9ed..42e7d6b7 100644 --- a/striker-ui-api/src/lib/shell.ts +++ b/striker-ui-api/src/lib/shell.ts @@ -21,6 +21,9 @@ const systemCall = ( return stdout; }; +export const date = (...args: string[]) => + systemCall(SERVER_PATHS.usr.bin.date.self, args); + export const mkfifo = (...args: string[]) => systemCall(SERVER_PATHS.usr.bin.mkfifo.self, args);