@@ -17,11 +17,11 @@ func SpawnThrustCore(addr string, autoloaderDisabled bool) (io.ReadCloser, io.Wr
1717 var thrustExecPath string
1818 var thrustBoostrapPath string
1919 if strings .Contains (runtime .GOOS , "darwin" ) {
20- thrustExecPath = "./vendor/darwin/x64/ThrustShell.app/Contents/MacOS/ThrustShell"
20+ thrustExecPath = "./vendor/darwin/x64/v" + THRUST_VERSION + "/ ThrustShell.app/Contents/MacOS/ThrustShell"
2121 thrustBoostrapPath = "./tools/bootstrap_darwin.sh"
2222 }
2323 if strings .Contains (runtime .GOOS , "linux" ) {
24- thrustExecPath = "./vendor/linux/x64/thrust_shell"
24+ thrustExecPath = "./vendor/linux/x64/v" + THRUST_VERSION + "/ thrust_shell"
2525 thrustBoostrapPath = "./tools/bootstrap_linux.sh"
2626 }
2727
@@ -30,14 +30,29 @@ func SpawnThrustCore(addr string, autoloaderDisabled bool) (io.ReadCloser, io.Wr
3030 Log .Info ("Could not find executable:" , thrustExecPath )
3131 Log .Info ("Attempting to Download and Install the Thrust Core Executable" )
3232
33- installCmd := exec .Command ("sh" , thrustBoostrapPath )
34- installCmd .Stdout = os .Stdout
35- installCmd .Stderr = os .Stderr
33+ installCmd := exec .Command ("sh" , thrustBoostrapPath , THRUST_VERSION )
34+ if Log .LogDebug () {
35+ installCmd .Stdout = os .Stdout
36+ installCmd .Stderr = os .Stderr
37+ }
3638
39+ installDoneChan := make (chan bool , 1 )
3740 installCmd .Start ()
38- Log .Info ("Waiting for install to finish...." )
39- installErr := installCmd .Wait ()
41+ fmt .Print ("Installing " )
42+ go func () {
43+ for {
44+ select {
45+ case <- installDoneChan :
46+ return
47+ default :
48+ fmt .Print ("." )
49+ time .Sleep (time .Second )
50+ }
51+ }
52+ }()
4053
54+ installErr := installCmd .Wait ()
55+ installDoneChan <- true
4156 if installErr != nil {
4257 Log .Errorf ("Could not bootstrap, ErrorCode:" , err )
4358 } else {
@@ -67,7 +82,7 @@ func SpawnThrustCore(addr string, autoloaderDisabled bool) (io.ReadCloser, io.Wr
6782
6883 cmd .Start ()
6984
70- time .Sleep (time .Millisecond * 1000 )
85+ // time.Sleep(time.Millisecond * 1000)
7186 Log .Info ("Returning to Main Process." )
7287 return cmdOut , cmdIn
7388 } else {
0 commit comments