1
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
昔念
2026-04-20 01:02:57 +08:00
parent 04038cd16b
commit d517c822ef
3 changed files with 9 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ package model
import (
"blazing/cool"
"context"
"encoding/json"
"fmt"
"strings"
@@ -161,8 +162,9 @@ func bindBossScriptFunctions(vm *goja.Runtime, hookAction any) {
})
_ = vm.Set("debug", func(call goja.FunctionCall) goja.Value {
logCtx := context.Background()
if len(call.Arguments) == 0 {
g.Log().Debugf(ctx, "[boss-script] debug() called with no arguments")
g.Log().Debugf(logCtx, "[boss-script] debug() called with no arguments")
return goja.Undefined()
}
@@ -176,7 +178,7 @@ func bindBossScriptFunctions(vm *goja.Runtime, hookAction any) {
parts = append(parts, arg.String())
}
g.Log().Debugf(ctx, "[boss-script] %s", strings.Join(parts, " "))
g.Log().Debugf(logCtx, "[boss-script] %s", strings.Join(parts, " "))
return goja.Undefined()
})
}