From 1f8b0acd6ae426a85b68442deb7face1a94c4a6d Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sat, 9 Dec 2023 19:12:55 +0400 Subject: [PATCH] Added a few spaces in run_command.go. --- cmd/mccl/commands/run_command.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/mccl/commands/run_command.go b/cmd/mccl/commands/run_command.go index af9aff8..150fbbd 100755 --- a/cmd/mccl/commands/run_command.go +++ b/cmd/mccl/commands/run_command.go @@ -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 }