Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
block windows sadly
  • Loading branch information
vilmibm committed Aug 25, 2020
commit dd84ce41e9cb9b9478a9c819b3b3363cd45eb38a
11 changes: 5 additions & 6 deletions pkg/cmd/repo/garden/garden.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ func NewCmdGarden(f *cmdutil.Factory, runF func(*GardenOptions) error) *cobra.Co
func gardenRun(opts *GardenOptions) error {
out := opts.IO.Out

if runtime.GOOS == "windows" {
return errors.New("sorry :( this command only works on linux and macos")
}

if !opts.IO.IsStdoutTTY() {
return errors.New("must be connected to a terminal")
}
Expand Down Expand Up @@ -450,12 +454,7 @@ func getCommits(client *api.Client, repo ghrepo.Interface, maxCommits int) ([]*C
}

func clear(io *iostreams.IOStreams) {
var cmd *exec.Cmd
if runtime.GOOS == "windows" {
cmd = exec.Command("cmd", "/c", "cls")
} else {
cmd = exec.Command("clear")
}
cmd := exec.Command("clear")
cmd.Stdout = io.Out
_ = cmd.Run()
}