mirror of
https://github.com/Octops/quake-kube.git
synced 2026-04-06 01:40:33 +00:00
Add context to content-server assets download error
This commit is contained in:
@ -21,9 +21,10 @@ var opts struct {
|
||||
|
||||
func NewCommand() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "content",
|
||||
Short: "q3 content server",
|
||||
SilenceUsage: true,
|
||||
Use: "content",
|
||||
Short: "q3 content server",
|
||||
SilenceErrors: true,
|
||||
SilenceUsage: true,
|
||||
RunE: func(cmd *cobra.Command, args []string) (err error) {
|
||||
if !filepath.IsAbs(opts.AssetsDir) {
|
||||
opts.AssetsDir, err = filepath.Abs(opts.AssetsDir)
|
||||
|
||||
@ -15,7 +15,7 @@ var global struct {
|
||||
Verbosity int
|
||||
}
|
||||
|
||||
func NewRootCommand() *cobra.Command {
|
||||
func main() {
|
||||
cmd := &cobra.Command{
|
||||
Use: "q3",
|
||||
Short: "",
|
||||
@ -28,11 +28,8 @@ func NewRootCommand() *cobra.Command {
|
||||
)
|
||||
|
||||
cmd.PersistentFlags().CountVarP(&global.Verbosity, "verbose", "v", "log output verbosity")
|
||||
return cmd
|
||||
}
|
||||
|
||||
func main() {
|
||||
if err := NewRootCommand().Execute(); err != nil {
|
||||
if err := cmd.Execute(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user