Added a few spaces in run_command.go.

This commit is contained in:
Alexander Andreev 2023-12-09 19:12:55 +04:00
parent ed493b012a
commit 1f8b0acd6a
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -31,9 +31,11 @@ func (rc *RunCommand) Run() error {
if rc.Id == "" {
return errors.New("an empty Minecraft version was provided")
}
if err := os.Chdir(rc.GameDir); err != nil {
return err
}
if rc.UseProfile {
if util.IsFileExist(path.Join(rc.GameDir, mcclprofile.ProfileFileName)) {
p, err := mcclprofile.Load(rc.GameDir)
@ -53,6 +55,7 @@ func (rc *RunCommand) Run() error {
}
}
}
return rc.run_client()
}
@ -156,6 +159,7 @@ func (rc *RunCommand) run_client() error {
fmt.Printf("Minecraft version %s is started with username %s and player's UUID %s.\n",
manifst.Id, rc.Username, rc.AuthUuid)
if err := cmd.Run(); err != nil && (err.Error() != "exec: already started") {
return err
}