Преглед изворни кода

dataprovider events: fix string formatting for program hook

Fixes #1845

Signed-off-by: Nicola Murino <[email protected]>
Nicola Murino пре 10 месеци
родитељ
комит
ecf7e0b49c
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      internal/dataprovider/actions.go

+ 1 - 1
internal/dataprovider/actions.go

@@ -141,7 +141,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),