Skip to content

Commit

Permalink
github: Try to fix "no space left on device" on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Aug 31, 2024
1 parent 6bde2a5 commit de9bcf9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,21 @@ func Lint() error {
return nil
}

func isCi() bool {
return os.Getenv("CI") != ""
}

func isDarwin() bool {
return runtime.GOOS == "darwin"
}

// Run go vet linter
func Vet() error {
if err := sh.Run(goexe, "vet", "./..."); err != nil {
if isCi() && isDarwin() {
// Skip on macOS in CI (disk space issues)
return nil
}
return fmt.Errorf("error running go vet: %v", err)
}
return nil
Expand Down

0 comments on commit de9bcf9

Please sign in to comment.