feat: add SSH test infrastructure, improve executor temp handling, enhance CLI workflow install

Amp-Thread-ID: https://ampcode.com/threads/T-019c195d-0f3b-724a-946a-a3a93dd7d09b
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
j3ssie
2026-02-01 20:21:05 +07:00
co-authored by Amp
parent 7de3e7b2b2
commit b80c8b6ecd
13 changed files with 433 additions and 38 deletions
+8
View File
@@ -303,6 +303,14 @@ func executeFunctionForTarget(printer *terminal.Printer, script, target string)
cfg := config.Get()
ctx := executor.BuildBuiltinVariables(cfg, params)
// Defer temp directory cleanup
if tempDir, ok := ctx["TempDir"].(string); ok && tempDir != "" {
defer func() {
_ = os.RemoveAll(tempDir)
}()
}
if target != "" {
ctx["target"] = target
}