安装过程显示更详细内容

This commit is contained in:
GoEdgeLab
2022-11-11 21:48:00 +08:00
parent 1a1b937a63
commit 6c40df361c
4 changed files with 69 additions and 22 deletions

View File

@@ -27,10 +27,11 @@ func main() {
app.Version(teaconst.Version)
app.Product(teaconst.ProductName)
app.Usage(teaconst.ProcessName + " [start|stop|restart|setup|upgrade|service|daemon|issues]")
app.On("setup", func() {
var setupCmd = setup.NewSetupFromCmd()
err := setupCmd.Run()
result := maps.Map{}
var result = maps.Map{}
if err != nil {
result["isOk"] = false
result["error"] = err.Error()