Skip to content

Commit

Permalink
Fix typo and clean up temp files in test.
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyen-phillip committed Jul 11, 2024
1 parent 36c451f commit 6e1bc4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions googet_addrepo.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ func (*addRepoCmd) Usage() string {

func (cmd *addRepoCmd) SetFlags(f *flag.FlagSet) {
f.StringVar(&cmd.file, "file", "", "repo file to add this repository to")
f.StringVar(&cmd.priority, "priority", "", "priority level to assigned to repository")
f.StringVar(&cmd.priority, "priority", "", "priority level assigned to repository")
}

func (cmd *addRepoCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus {

var newEntry repoEntry
switch f.NArg() {
case 0, 1:
Expand Down
3 changes: 3 additions & 0 deletions googet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,9 @@ func TestWriteRepoFile(t *testing.T) {
if err != nil {
t.Fatalf("os.CreateTemp: %v", err)
}
defer func() {
os.Remove(f.Name())
}()
if err := f.Close(); err != nil {
t.Fatalf("f.Close: %v", err)
}
Expand Down

0 comments on commit 6e1bc4f

Please sign in to comment.