mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-03 09:57:41 +08:00
Merge pull request #1657 from ktock/argpath
controller: use os.Executable() for getting the exceutable path
This commit is contained in:
commit
14d8f95ec9
@ -297,7 +297,7 @@ func (c *buildxController) Kill(ctx context.Context) error {
|
|||||||
|
|
||||||
func launch(ctx context.Context, logFile string, args ...string) (func() error, 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
|
// 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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user