fix: Remove easter egg mentioning competitor (#2250)

This is more confusing than helpful!
This commit is contained in:
Kyle Carberry 2022-06-10 13:14:06 -05:00 committed by GitHub
parent 928958c94c
commit f79ab7f87e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 24 deletions

View File

@ -4,9 +4,6 @@ import (
"errors"
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
_ "time/tzdata"
"github.com/coder/coder/cli"
@ -14,7 +11,6 @@ import (
)
func main() {
dadjoke()
cmd, err := cli.Root().ExecuteC()
if err != nil {
if errors.Is(err, cliui.Canceled) {
@ -25,23 +21,3 @@ func main() {
os.Exit(1)
}
}
//nolint
func dadjoke() {
if os.Getenv("EEOFF") != "" || filepath.Base(os.Args[0]) != "gitpod" {
return
}
args := strings.Fields(`run -it --rm git --image=index.docker.io/bitnami/git --command --restart=Never -- git`)
args = append(args, os.Args[1:]...)
cmd := exec.Command("kubectl", args...)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
_ = cmd.Start()
err := cmd.Wait()
if exitErr, ok := err.(*exec.ExitError); ok {
os.Exit(exitErr.ExitCode())
}
os.Exit(0)
}