From 5ebca22225060e65f8fe5567f3dc92930a486285 Mon Sep 17 00:00:00 2001 From: ruinivist Date: Thu, 19 Mar 2026 18:58:18 +0000 Subject: [PATCH] refactor: renaem record shell.sh.tmpl to just .sh since no longer a template --- internal/miro/record_shell.go | 8 ++++---- internal/miro/{record_shell.sh.tmpl => record_shell.sh} | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) rename internal/miro/{record_shell.sh.tmpl => record_shell.sh} (78%) diff --git a/internal/miro/record_shell.go b/internal/miro/record_shell.go index 865b23b..1565664 100644 --- a/internal/miro/record_shell.go +++ b/internal/miro/record_shell.go @@ -12,8 +12,8 @@ import ( const recordShellName = "shell.sh" -//go:embed record_shell.sh.tmpl -var recordShellTemplateFS embed.FS +//go:embed record_shell.sh +var recordShellFS embed.FS func recordShellPath(testDir string) string { return filepath.Join(testDir, recordShellName) @@ -63,9 +63,9 @@ func resolveRecordShell(testDir string) (string, error) { } func buildRecordShellScript() string { - body, err := recordShellTemplateFS.ReadFile("record_shell.sh.tmpl") + body, err := recordShellFS.ReadFile("record_shell.sh") if err != nil { - panic(fmt.Sprintf("read record shell template: %v", err)) + panic(fmt.Sprintf("read record shell: %v", err)) } return string(body) diff --git a/internal/miro/record_shell.sh.tmpl b/internal/miro/record_shell.sh similarity index 78% rename from internal/miro/record_shell.sh.tmpl rename to internal/miro/record_shell.sh index 6fc4dd2..132f92f 100644 --- a/internal/miro/record_shell.sh.tmpl +++ b/internal/miro/record_shell.sh @@ -1,11 +1,9 @@ #!/bin/sh set -eu -# Host directory mounted as the sandboxed HOME. +# hoisted vars to fail fast if any missing host_home=${MIRO_HOST_HOME:?} -# Host temp directory mounted read-write inside the sandbox. host_tmp=${MIRO_HOST_TMP:?} -# PATH value forwarded into the sandbox so required tools stay available. path_env=${MIRO_PATH_ENV:?} visible_home=${MIRO_VISIBLE_HOME:?}