diff options
-rw-r--r-- | main.go | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -42,15 +42,8 @@ func main() { log.Println("Starting craft") defer log.Println("Exiting craft") - source, err := os.MkdirTemp("", "*-craft") - if err != nil { - log.Fatal(err) - } - defer os.RemoveAll(source) - checkout(repo, commit, source) - vm := qemu() - err = vm.Start() + err := vm.Start() if err != nil { log.Fatal(err) } @@ -60,6 +53,14 @@ func main() { log.Fatal(err) } }() + + source, err := os.MkdirTemp("", "*-craft") + if err != nil { + log.Fatal(err) + } + defer os.RemoveAll(source) + checkout(repo, commit, source) + waitBoot() upload(source) |