small fix

This commit is contained in:
maddalax 2024-09-23 12:01:40 -05:00
parent b7d9477263
commit f4fcf6f7c4
2 changed files with 4 additions and 2 deletions

View file

@ -60,8 +60,8 @@ func DownloadTemplate(outPath string) {
process.SetWorkingDir(newDir)
commands := [][]string{
{"go", "get", "github.com/maddalax/htmgo/framework"},
{"go", "get", "github.com/maddalax/htmgo/framework-ui"},
{"go", "get", "github.com/maddalax/htmgo/framework@latest"},
{"go", "get", "github.com/maddalax/htmgo/framework-ui@latest"},
{"git", "init"},
}

View file

@ -2,12 +2,14 @@ package module
import (
"fmt"
"github.com/maddalax/htmgo/cli/htmgo/tasks/process"
"os/exec"
"strings"
)
func GetDependencyPath(dep string) string {
cmd := exec.Command("go", "list", "-m", "-f", "{{.Dir}}", dep)
cmd.Dir = process.GetWorkingDir()
// Run the command and capture the output
output, err := cmd.CombinedOutput() // Use CombinedOutput to capture both stdout and stderr
if err != nil {