mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
[FIX] fix bug "err declared and not used"
This commit is contained in:
parent
2dff36b3d5
commit
4b02f58beb
@ -180,6 +180,9 @@ func (l *LogAction) GetLinesLogs(alias string, n int) ([]byte, error) {
|
||||
downLoadDIR := "/grdata/downloads"
|
||||
filePath := fmt.Sprintf("%s/log/%s/stdout.log", downLoadDIR, alias)
|
||||
if ok, err := util.FileExists(filePath); !ok {
|
||||
if err != nil {
|
||||
logrus.Errorf("check file exist error %s", err.Error())
|
||||
}
|
||||
return []byte(""), nil
|
||||
}
|
||||
f, err := exec.Command("tail", "-n", fmt.Sprintf("%d", n), filePath).Output()
|
||||
|
Loading…
Reference in New Issue
Block a user