diff --git a/pkg/cmd/gist/view/view.go b/pkg/cmd/gist/view/view.go index 2a19f5958..a6f4d528a 100644 --- a/pkg/cmd/gist/view/view.go +++ b/pkg/cmd/gist/view/view.go @@ -55,7 +55,7 @@ func NewCmdView(f *cmdutil.Factory, runF func(*ViewOptions) error) *cobra.Comman } if !opts.IO.IsStdoutTTY() { - opts.Raw = true + return cmdutil.FlagErrorf("run or gist ID required when not running interactively\n\nUsage: gh gist view [ | ] [flags]\n\nFlags:\n -f, --filename string Display a single file from the gist\n --files List file names from the gist\n -r, --raw Print raw instead of rendered gist contents\n -w, --web Open gist in the browser\n") } if runF != nil {