Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaz492 committed Nov 26, 2024
2 parents c3c9051 + 029a331 commit f1f067f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions modloaders/fabric.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ func (s Fabric) Install(useOwnJava bool) error {
jrePath, err = util.GetJavaPath(s.Targets.JavaVersion)
if err != nil {
jrePath = "java"
} else {
jrePath = filepath.Join(s.InstallDir, jrePath)
}
}

jrePath = filepath.Join(s.InstallDir, jrePath)

pterm.Debug.Printfln("JRE Path: %s", jrePath)
cmd := exec.Command(jrePath, "-jar", installerName, "server", "-mcversion", s.Targets.McVersion, "-loader", s.Targets.ModLoader.Version, "-downloadMinecraft")
cmd.Dir = s.InstallDir
cmd.Stdout = os.Stdout
Expand Down
5 changes: 3 additions & 2 deletions modloaders/forge.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@ func (s Forge) Install(useOwnJava bool) error {
jrePath, err = util.GetJavaPath(s.Targets.JavaVersion)
if err != nil {
jrePath = "java"
} else {
jrePath = filepath.Join(s.InstallDir, jrePath)
}
}

jrePath = filepath.Join(s.InstallDir, jrePath)

pterm.Debug.Printfln("JRE Path: %s", jrePath)
cmd := exec.Command(jrePath, "-jar", jarName, "--installServer")
cmd.Dir = s.InstallDir
cmd.Stdout = os.Stdout
Expand Down
5 changes: 3 additions & 2 deletions modloaders/neoforge.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ func (s NeoForge) Install(useOwnJava bool) error {
jrePath, err = util.GetJavaPath(s.Targets.JavaVersion)
if err != nil {
jrePath = "java"
} else {
jrePath = filepath.Join(s.InstallDir, jrePath)
}
}

jrePath = filepath.Join(s.InstallDir, jrePath)

pterm.Debug.Printfln("JRE Path: %s", jrePath)
cmd := exec.Command(jrePath, "-jar", installerName, "--installServer")
cmd.Dir = s.InstallDir
cmd.Stdout = os.Stdout
Expand Down

0 comments on commit f1f067f

Please sign in to comment.