controller: use os.Executable() for getting the exceutable path

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
This commit is contained in:
Kohei Tokunaga 2023-03-01 15:49:07 +09:00
parent f2ac30f431
commit b0728c96d3

View File

@ -297,7 +297,7 @@ func (c *buildxController) Kill(ctx context.Context) error {
func launch(ctx context.Context, logFile string, args ...string) (func() error, error) {
// set absolute path of binary, since we set the working directory to the root
pathname, err := filepath.Abs(os.Args[0])
pathname, err := os.Executable()
if err != nil {
return nil, err
}