Skip to content

Commit 02ce64d

Browse files
author
aperkovic
committed
Fixed logging of factorio version, removed commented line
1 parent 2fe4d3d commit 02ce64d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/factorio_server.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,14 @@ func initFactorio() (f *FactorioServer, err error) {
9696

9797
log.Printf("Loaded Factorio settings from %s\n", settingsPath)
9898

99+
out := []byte{}
99100
//Load factorio version
100-
out, err := exec.Command(config.glibcLocation, "--library-path", config.glibcLibLoc, config.FactorioBinary, "--version").Output()
101+
if config.glibcCustom == "true" {
102+
out, err = exec.Command(config.glibcLocation, "--library-path", config.glibcLibLoc, config.FactorioBinary, "--version").Output()
103+
} else {
104+
out, err = exec.Command(config.FactorioBinary, "--version").Output()
105+
}
106+
101107
if err != nil {
102108
log.Printf("error on loading factorio version: %s", err)
103109
return
@@ -179,8 +185,6 @@ func (f *FactorioServer) Run() error {
179185
f.Cmd = exec.Command(config.FactorioBinary, args...)
180186
}
181187

182-
//f.Cmd = exec.Command(config.glibcLocation, "--library-path", config.glibcLibLoc, config.FactorioBinary, args...)
183-
184188
f.StdOut, err = f.Cmd.StdoutPipe()
185189
if err != nil {
186190
log.Printf("Error opening stdout pipe: %s", err)

0 commit comments

Comments
 (0)