fix: print out errors when agent setup script generating fails
@@ -2,6 +2,7 @@ package provisioner
import (
"bytes"
+ "fmt"
"text/template"
"github.com/determined-ai/determined/master/pkg/device"
@@ -30,7 +31,7 @@ func mustMakeAgentSetupScript(config agentSetupScriptConfig) []byte {
tpl := template.Must(template.New("AgentSetupScript").Parse(templateStr))
var buf bytes.Buffer
if err := tpl.Execute(&buf, config); err != nil {
- panic("cannot generate agent setup script")
+ panic(fmt.Sprint("cannot generate agent setup script", err))
}
return buf.Bytes()
}
