refactor(contorller): changes to accept the drive letter as 2 plants are on d drive

This commit is contained in:
2025-09-09 21:16:22 -05:00
parent a082dfee6c
commit 610dca259d
2 changed files with 6 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ import (
socketio "github.com/googollee/go-socket.io"
)
func copyBuild(server *socketio.Server, plant string) {
func copyBuild(server *socketio.Server, plant string, drive string) {
// Load from environment in real-life code!
user := os.Getenv("ADM_USER")
pass := os.Getenv("ADM_PASS")
@@ -21,7 +21,7 @@ func copyBuild(server *socketio.Server, plant string) {
// latest build
latestbuild := lastestBuild()
src := latestbuild
plantServer := fmt.Sprintf("\\\\%v\\e$\\lst", plant)
plantServer := fmt.Sprintf("\\\\%v\\%v$\\lst", plant, drive)
// Build PowerShell
psScript := fmt.Sprintf(`