返回 DeepSeek-Reasonix
shell_label.go
根目录 / internal / boot / shell_label.go
1 package boot
2
3 import (
4 "strings"
5
6 "reasonix/internal/sandbox"
7 )
8
9 // resolvedShellLabel preserves the cache-stable kind label when the user did
10 // not configure an explicit path. When a path was configured, it reports the
11 // interpreter actually bound after validation and fallback, so a stale path
12 // can never describe a different executable.
13 func resolvedShellLabel(shell sandbox.Shell, configuredPath string) string {
14 if strings.TrimSpace(configuredPath) != "" {
15 if path := strings.TrimSpace(shell.Path); path != "" {
16 return path
17 }
18 }
19 return shell.Kind.String()
20 }
21
21 lines GO