Skip to content

Commit fb98afb

Browse files
committed
Fix cleanup
1 parent ad1230a commit fb98afb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

run/flagparser_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ type SampleOption struct {
3131

3232
func Test_FlagParser(t *testing.T) {
3333
// Simulate command line arguments
34+
origArgs := os.Args
3435
os.Args = []string{
3536
"cmd",
3637
"-solve.iterations=10",
3738
"-custom.solve.plateau.auto=true",
3839
"-solve.duration=5m",
3940
}
40-
defer func() { os.Args = os.Args[:1] }()
41+
defer func() { os.Args = origArgs }()
4142

4243
_, option, err := run.FlagParser[SampleOption, run.CLIRunnerConfig]()
4344
if err != nil {

0 commit comments

Comments
 (0)