@dcode-dev/dcode-cli 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/dcode-bin +0 -0
- package/cmd/root.go +12 -1
- package/package.json +1 -1
package/bin/dcode-bin
CHANGED
|
Binary file
|
package/cmd/root.go
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
package cmd
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
|
+
"fmt"
|
|
5
|
+
"os"
|
|
6
|
+
|
|
4
7
|
"github.com/spf13/cobra"
|
|
5
8
|
)
|
|
6
9
|
|
|
@@ -28,7 +31,15 @@ Features:
|
|
|
28
31
|
• Patch management
|
|
29
32
|
|
|
30
33
|
Configure your provider in .env file or use --provider flag.`,
|
|
31
|
-
|
|
34
|
+
// Only run agent if no subcommand is provided
|
|
35
|
+
Run: func(cmd *cobra.Command, args []string) {
|
|
36
|
+
// If a subcommand was provided, cobra will handle it
|
|
37
|
+
// This only runs when 'dcode' is called with no subcommand
|
|
38
|
+
if err := runAgentV2(cmd, args); err != nil {
|
|
39
|
+
fmt.Printf("Error: %v\n", err)
|
|
40
|
+
os.Exit(1)
|
|
41
|
+
}
|
|
42
|
+
},
|
|
32
43
|
}
|
|
33
44
|
|
|
34
45
|
func Execute() error {
|