Loyal-Young opened a new issue, #7059:
URL: https://github.com/apache/rocketmq-dashboard/issues/7059

   ## Problem
   
   Running `rmqctl/scripts/build-windows.ps1` from an existing PowerShell 
session changes the caller's working directory to the rmqctl module root and 
leaves `GOOS`, `GOARCH`, and `CGO_ENABLED` set to the native build target. If 
Go is found at `C:\go`, it also leaves the modified `Path` behind. A developer 
who had a cross-compilation target or who invoked the script from the 
repository root then runs subsequent commands in a different shell state.
   
   ## Reproduction
   
   Set `GOOS=linux`, `GOARCH=arm64`, `CGO_ENABLED=1` in PowerShell, note the 
working directory, then invoke the Windows build script with the call operator. 
After it completes, the current code leaves `GOOS=windows`, the host `GOARCH`, 
`CGO_ENABLED=0`, and the current directory at `rmqctl/`. The directory change 
also persists on an early failure, such as Go not being installed.
   
   ## Expected
   
   Build and optional tests use a native target inside the script, while its 
caller's working directory and process environment are restored on success and 
failure.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to