install kemoforge when creating project

This commit is contained in:
shynd 2024-06-26 03:22:49 +02:00
parent 0ca987ca2e
commit 520332e21d
No known key found for this signature in database
GPG Key ID: 31DC000B2E21D69D
1 changed files with 9 additions and 10 deletions

View File

@ -463,15 +463,15 @@ func (p KFProject) Create(window fyne.Window) error {
}
loading.SetProgress(95, "Installing KemoForge")
// cmd = exec.Command("go", "get", "g.r-io.lu/shynd/kemoforge@latest")
// cmd.Stderr = &stderr
// cmd.Dir = projectDir
// err = cmd.Run()
// if err != nil {
// log.Printf("Error installing KemoForge: %v", err)
// log.Printf("Stderr: %s", stderr.String())
// return errors.New("error installing KemoForge")
// }
cmd = exec.Command("go", "get", "g.r-io.lu/shynd/kemoforge@latest")
cmd.Stderr = &stderr
cmd.Dir = projectDir
err = cmd.Run()
if err != nil {
log.Printf("Error installing KemoForge: %v", err)
log.Printf("Stderr: %s", stderr.String())
return errors.New("error installing KemoForge")
}
//Run go mod tidy
loading.SetProgress(97, "Running go mod tidy")
@ -483,7 +483,6 @@ func (p KFProject) Create(window fyne.Window) error {
log.Printf("Error running go mod tidy: %v", err)
log.Printf("Stderr: %s", stderr.String())
return errors.New("error running go mod tidy")
}
loading.SetProgress(100, "Project Created")