mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-19 23:40:31 +00:00
Fix ReplaceHome implementation
This commit is contained in:
parent
804943a1e8
commit
3293160dcb
1 changed files with 7 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
|
||||
"github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
||||
|
|
@ -342,7 +342,12 @@ func ReplaceHome(path string) string {
|
|||
} else {
|
||||
userData, err = user.Lookup(homeString[1:])
|
||||
if err != nil {
|
||||
messenger.Error("Could not find user: ", err)
|
||||
if messeger != nil {
|
||||
messenger.Error("Could not find user: ", err)
|
||||
} else {
|
||||
TermMessage("Could not find user: ", err)
|
||||
}
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue