Skip to content

Commit eba8811

Browse files
committed
Remove explicit -work-dir argument (source from env)
1 parent d8af77d commit eba8811

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tool/cmd/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import (
1515
)
1616

1717
const (
18-
exitCodeFailure = -1
19-
exitCodeUsageError = 2
18+
exitCodeFailure = -1
2019

2120
debugLogFilename = "debug.log"
2221
)
@@ -33,6 +32,7 @@ func main() {
3332
Usage: "The path to a directory where working files will be written",
3433
TakesFile: true,
3534
Value: filepath.Join(".", util.BuildTempDir),
35+
Sources: cli.NewValueSourceChain(cli.EnvVar(util.EnvOtelWorkDir)),
3636
},
3737
},
3838
Commands: []*cli.Command{

tool/internal/setup/setup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func BuildWithToolexec(ctx context.Context, args []string) error {
8989
if err != nil {
9090
return ex.Errorf(err, "failed to get executable path")
9191
}
92-
insert := "-toolexec=" + execPath + " --work-dir=" + util.GetOtelWorkDir() + " toolexec"
92+
insert := "-toolexec=" + execPath + " toolexec"
9393
const additionalCount = 2
9494
newArgs := make([]string, 0, len(args)+additionalCount) // Avoid in-place modification
9595
newArgs = append(newArgs, "go")

0 commit comments

Comments
 (0)