From e0c6f879bfc1e64303459e701d56bed855f918d2 Mon Sep 17 00:00:00 2001 From: AlkaidChen <362774405@qq.com> Date: Fri, 23 Aug 2024 11:00:00 +0800 Subject: [PATCH] feat: hook support bat and powershell in windows (#3379) --- bcs-services/bcs-bscp/pkg/dal/table/hook.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bcs-services/bcs-bscp/pkg/dal/table/hook.go b/bcs-services/bcs-bscp/pkg/dal/table/hook.go index a076ea5ccf..e5e8bf21c2 100644 --- a/bcs-services/bcs-bscp/pkg/dal/table/hook.go +++ b/bcs-services/bcs-bscp/pkg/dal/table/hook.go @@ -145,6 +145,12 @@ const ( // Python is the type for python hook Python ScriptType = "python" + + // Bat is the type for bat hook + Bat ScriptType = "bat" + + // PowerShell is the type for powershell hook + PowerShell ScriptType = "powershell" ) // ScriptType is the type of hook script @@ -163,6 +169,8 @@ func (s ScriptType) Validate() error { switch s { case Shell: case Python: + case Bat: + case PowerShell: default: return fmt.Errorf("unsupported hook type: %s", s) }