feat: complete session preferences and PAM fixture gates

This commit is contained in:
2026-09-26 02:44:29 +05:30
parent 83345a1842
commit ee6186ed0b
34 changed files with 801 additions and 327 deletions

View File

@@ -168,7 +168,6 @@ func LoadVariables(filename string) (map[string]string, error) {
if err != nil {
return nil, fmt.Errorf("read %s: %w", filename, err)
}
// Parse a flat TOML table of string values.
vars := make(map[string]string)
var table map[string]any
if err := toml.Unmarshal(raw, &table); err != nil {
@@ -180,8 +179,6 @@ func LoadVariables(filename string) (map[string]string, error) {
return vars, nil
}
// ── variable substitution ───────────────────────────────────────────────
func resolveVars(in string, vars map[string]string) string {
for k, v := range vars {
in = strings.ReplaceAll(in, "$"+k, v)
@@ -189,8 +186,6 @@ func resolveVars(in string, vars map[string]string) string {
return in
}
// ── embedded default config ─────────────────────────────────────────────
const defaultTOML = `
tty = 2
main_log_path = "/var/log/latchd.log"