Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit fb8bec0

Browse files
committed
Playing
Change-Id: I583ced10984d44ce6acbe379eab36868369c4453
1 parent b9e64a5 commit fb8bec0

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

cmd/coder/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
"github.com/spf13/pflag"
1111

12-
"github.com/mutagen-io/mutagen/pkg/command/mutagen"
1312
"go.coder.com/cli"
1413
)
1514

@@ -52,7 +51,7 @@ func main() {
5251
}()
5352
}
5453
if filepath.Base(os.Args[0]) == "mutagen" {
55-
mutagen.Main()
54+
mutagenMain()
5655
return
5756
}
5857
cli.RunRoot(&rootCmd{})

cmd/coder/mutagen.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
package main
22

33
import (
4-
"github.com/mutagen-io/mutagen/pkg/command/mutagen"
4+
"os"
5+
_ "unsafe"
6+
57
"github.com/spf13/pflag"
68
"go.coder.com/cli"
7-
"os"
89
)
910

11+
//go:linkname mutagenMain github.com/mutagen-io/mutagen/cmd/mutagen.main
12+
func mutagenMain()
13+
1014
type mutagenCmd struct {
1115

1216
}
@@ -24,6 +28,6 @@ func (m *mutagenCmd) Run(_ *pflag.FlagSet) {
2428
// Pop out first argument (coder) so mutagen thinks its mutagen.
2529
copy(os.Args, os.Args[1:])
2630
os.Args = os.Args[:len(os.Args)-1]
27-
mutagen.Main()
31+
mutagenMain()
2832
}
2933

0 commit comments

Comments
 (0)