Skip to content

Commit 57a0355

Browse files
docs(bee-dev): update dev command with deprecation warning and doc link (#5283)
1 parent 02704a1 commit 57a0355

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

cmd/bee/cmd/start_dev.go

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ import (
1414
"github.com/ethersphere/bee/v2/pkg/node"
1515
"github.com/kardianos/service"
1616
"github.com/spf13/cobra"
17+
"golang.org/x/term"
1718
)
1819

1920
func (c *command) initStartDevCmd() (err error) {
2021

2122
cmd := &cobra.Command{
2223
Use: "dev",
23-
Short: "Start a Swarm node in development mode",
24+
Short: "Start in dev mode. WARNING: This command will be deprecated soon.",
25+
Long: "WARNING: This command will be deprecated soon. For more information, please refer to the official documentation: https://docs.ethswarm.org/docs/develop/tools-and-features/bee-dev-mode and check back regularly for updates.",
2426
PersistentPreRunE: c.CheckUnknownParams,
2527
RunE: func(cmd *cobra.Command, args []string) (err error) {
2628
if len(args) > 0 {
@@ -54,6 +56,26 @@ func (c *command) initStartDevCmd() (err error) {
5456

5557
fmt.Println(beeASCII)
5658
fmt.Println()
59+
60+
warningBox := `
61+
╔══════════════════════════════════════════════════════════════════════════════╗
62+
║ ║
63+
║ WARNING: This command will be deprecated soon. ║
64+
║ ║
65+
║ For more information, please refer to the official documentation: ║
66+
║ https://docs.ethswarm.org/docs/develop/tools-and-features/bee-dev-mode ║
67+
║ ║
68+
║ Please check back regularly for updates. ║
69+
║ ║
70+
╚══════════════════════════════════════════════════════════════════════════════╝
71+
`
72+
if term.IsTerminal(int(os.Stdout.Fd())) {
73+
fmt.Print("\u001b[33m" + warningBox + "\u001b[0m")
74+
} else {
75+
fmt.Print(warningBox)
76+
}
77+
fmt.Println()
78+
5779
fmt.Println("Starting in development mode")
5880
fmt.Println()
5981

0 commit comments

Comments
 (0)