fix(env): log error on window title

This commit is contained in:
Jan De Dobbeleer 2022-04-04 19:10:58 +02:00 committed by Jan De Dobbeleer
parent 4b8d3adb39
commit ce8bfece2d

View file

@ -72,7 +72,11 @@ func (env *ShellEnvironment) Home() string {
func (env *ShellEnvironment) QueryWindowTitles(processName, windowTitleRegex string) (string, error) { func (env *ShellEnvironment) QueryWindowTitles(processName, windowTitleRegex string) (string, error) {
defer env.trace(time.Now(), "WindowTitle", windowTitleRegex) defer env.trace(time.Now(), "WindowTitle", windowTitleRegex)
return queryWindowTitles(processName, windowTitleRegex) title, err := queryWindowTitles(processName, windowTitleRegex)
if err != nil {
env.log(Error, "QueryWindowTitles", err.Error())
}
return title, err
} }
func (env *ShellEnvironment) IsWsl() bool { func (env *ShellEnvironment) IsWsl() bool {