[REV] Add debug log for generate start script for export app

This commit is contained in:
Zhang Jiajun 2018-05-11 13:55:20 +08:00
parent e1085e0c02
commit d2d8df1d2a

View File

@ -38,7 +38,6 @@ import (
"path" "path"
"strconv" "strconv"
"strings" "strings"
"github.com/goodrain/rainbond/webcli/app"
) )
//ExportApp Export app to specified format(rainbond-app or dockercompose) //ExportApp Export app to specified format(rainbond-app or dockercompose)
@ -499,7 +498,12 @@ func (i *ExportApp) generateDockerComposeYaml() error {
} }
func (i *ExportApp) generateStartScript() error { func (i *ExportApp) generateStartScript() error {
return exec.Command(fmt.Sprintf("cp /src/export-app/run.sh %s/", i.SourceDir)).Run() if err := exec.Command(fmt.Sprintf("cp /src/export-app/run.sh %s/", i.SourceDir)).Run(); err != nil {
logrus.Error("Failed to generate start script to: ", i.SourceDir)
}
logrus.Debug("Success to generate start script to: ", i.SourceDir)
return nil
} }
func (i *ExportApp) generateTarFile() error { func (i *ExportApp) generateTarFile() error {