From 8c5f92aeb1d35abed33c3d88ea594b563253ef54 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Wed, 18 Dec 2024 18:35:51 +0100 Subject: [PATCH] dataprovider events: fix string formatting for program hook Fixes #1845 Signed-off-by: Nicola Murino --- internal/dataprovider/actions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/dataprovider/actions.go b/internal/dataprovider/actions.go index 5341e0b1..b511ffb0 100644 --- a/internal/dataprovider/actions.go +++ b/internal/dataprovider/actions.go @@ -142,7 +142,7 @@ func executeNotificationCommand(operation, executor, ip, objectType, objectName, cmd := exec.CommandContext(ctx, config.Actions.Hook, args...) cmd.Env = append(env, - fmt.Sprintf("SFTPGO_PROVIDER_ACTION=%vs", operation), + fmt.Sprintf("SFTPGO_PROVIDER_ACTION=%s", operation), fmt.Sprintf("SFTPGO_PROVIDER_OBJECT_TYPE=%s", objectType), fmt.Sprintf("SFTPGO_PROVIDER_OBJECT_NAME=%s", objectName), fmt.Sprintf("SFTPGO_PROVIDER_USERNAME=%s", executor),