Simplify environment creation for server

This commit is contained in:
Dane Everitt
2020-09-12 21:48:04 -07:00
parent be49e08f4f
commit ce2659fdd7
4 changed files with 13 additions and 33 deletions

View File

@@ -277,7 +277,10 @@ func postTransfer(c *gin.Context) {
server.GetServers().Add(i.Server())
// Create the server's environment (note this does not execute the install script)
i.Execute()
if err := i.Server().CreateEnvironment(); err != nil {
l.WithField("error", err).Error("failed to create server environment")
return
}
// Un-archive the archive. That sounds weird..
if err := archiver.NewTarGz().Unarchive(archivePath, i.Server().Filesystem.Path()); err != nil {