mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
parent
f9efe17da3
commit
835b80d9bf
|
@ -110,7 +110,11 @@ func queryWindowTitles(processName, windowTitleRegex string) (string, error) {
|
||||||
// In our case, title will equal "" or the title of the window anyway
|
// In our case, title will equal "" or the title of the window anyway
|
||||||
err := enumWindows(cb, 0)
|
err := enumWindows(cb, 0)
|
||||||
if len(title) == 0 {
|
if len(title) == 0 {
|
||||||
return "", errors.New("no matching window title found\n" + err.Error())
|
var message string
|
||||||
|
if err != nil {
|
||||||
|
message = err.Error()
|
||||||
|
}
|
||||||
|
return "", errors.New("no matching window title found\n" + message)
|
||||||
}
|
}
|
||||||
return title, nil
|
return title, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue