TUN-1098: removed deprecation error

This commit is contained in:
Austin Cherry 2018-10-08 11:09:57 -05:00
parent ca9902a8d1
commit da0defcec9
1 changed files with 0 additions and 12 deletions

View File

@ -2,11 +2,8 @@ package main
import ( import (
"fmt" "fmt"
"os"
"time" "time"
"golang.org/x/crypto/ssh/terminal"
"github.com/cloudflare/cloudflared/cmd/cloudflared/access" "github.com/cloudflare/cloudflared/cmd/cloudflared/access"
"github.com/cloudflare/cloudflared/cmd/cloudflared/tunnel" "github.com/cloudflare/cloudflared/cmd/cloudflared/tunnel"
"github.com/cloudflare/cloudflared/cmd/cloudflared/updater" "github.com/cloudflare/cloudflared/cmd/cloudflared/updater"
@ -87,11 +84,6 @@ func flags() []cli.Flag {
func action(version string, shutdownC, graceShutdownC chan struct{}) cli.ActionFunc { func action(version string, shutdownC, graceShutdownC chan struct{}) cli.ActionFunc {
return func(c *cli.Context) (err error) { return func(c *cli.Context) (err error) {
if isRunningFromTerminal() {
logger.Error("Use of cloudflared without commands is deprecated.")
cli.ShowAppHelp(c)
return nil
}
tags := make(map[string]string) tags := make(map[string]string)
tags["hostname"] = c.String("hostname") tags["hostname"] = c.String("hostname")
raven.SetTagsContext(tags) raven.SetTagsContext(tags)
@ -115,7 +107,3 @@ func userHomeDir() (string, error) {
} }
return homeDir, nil return homeDir, nil
} }
func isRunningFromTerminal() bool {
return terminal.IsTerminal(int(os.Stdout.Fd()))
}