mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-23 22:40:24 +02:00
use a red colored stderr writer for the cobra cmd errors
This commit is contained in:
1 parent
070a1cd6d9
commit
5b94aced3a
3 files changed
+37
-16
No files matched your search
@@ -118,13 +118,11 @@ func (p *plugin) createCommand() *cobra.Command {
|
||||
`
|
||||
|
||||
command := &cobra.Command{
|
||||
Use: "migrate",
|
||||
Short: "Executes app DB migration scripts",
|
||||
Long: cmdDesc,
|
||||
ValidArgs: []string{"up", "down", "create", "collections"},
|
||||
// prevents printing the error log twice
|
||||
SilenceErrors: true,
|
||||
SilenceUsage: true,
|
||||
Use: "migrate",
|
||||
Short: "Executes app DB migration scripts",
|
||||
Long: cmdDesc,
|
||||
ValidArgs: []string{"up", "down", "create", "collections"},
|
||||
SilenceUsage: true,
|
||||
RunE: func(command *cobra.Command, args []string) error {
|
||||
cmd := ""
|
||||
if len(args) > 0 {
|
||||
|
||||
Reference in new issue
Block a user