提交 b9f7dd50 编写于 作者: D Derek Parker 提交者: Alessandro Arzilli

cmd/dlv: Change name for binary dlv auto compiles

Prevent conflicts by choosing a name that is extremely unlikely to
conflict with any actual package a user may have in their code.

Fixes #580
上级 215e13e8
......@@ -19,7 +19,7 @@ dlv debug [package]
### Options
```
--output string Output path for the binary. (default "debug")
--output string Output path for the binary. (default "./__debug_bin")
```
### Options inherited from parent commands
......
......@@ -171,7 +171,7 @@ package name and Delve will compile that package instead, and begin a new debug
session.`,
Run: debugCmd,
}
debugCommand.Flags().String("output", "debug", "Output path for the binary.")
debugCommand.Flags().String("output", "./__debug_bin", "Output path for the binary.")
RootCommand.AddCommand(debugCommand)
// 'exec' subcommand.
......
......@@ -123,7 +123,7 @@ func testOutput(t *testing.T, dlvbin, output string, delveCmds []string) (stdout
buildtestdir := filepath.Join(protest.FindFixturesDir(), "buildtest")
c := []string{dlvbin, "debug"}
debugbin := filepath.Join(buildtestdir, "debug")
debugbin := filepath.Join(buildtestdir, "__debug_bin")
if output != "" {
c = append(c, "--output", output)
if filepath.IsAbs(output) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册