Closed SpotlightForBugs closed 2 months ago
@SpotlightForBugs I can't reproduce this, however I see where it fails which feels like a race condition. I'll provide a fix for this.
@JanDeDobbeleer I'd love that. Thank you in advance!
Keep up the great work!
Code of Conduct
What happened?
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Users\Johannes> oh-my-posh font install meslo
PS C:\Users\Johannes> oh-my-posh font install meslo --user
Caught panic:
runtime error: invalid memory address or nil pointer dereference
Restoring terminal...
goroutine 1 [running]: runtime/debug.Stack() /opt/hostedtoolcache/go/1.22.3/x64/src/runtime/debug/stack.go:24 +0x5e runtime/debug.PrintStack() /opt/hostedtoolcache/go/1.22.3/x64/src/runtime/debug/stack.go:16 +0x13 github.com/charmbracelet/bubbletea.(Program).Run.func1() /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.26.5/tea.go:479 +0x91 panic({0xae51a0?, 0x12eef70?}) /opt/hostedtoolcache/go/1.22.3/x64/src/runtime/panic.go:770 +0x132 github.com/jandedobbeleer/oh-my-posh/src/font.(main).Update(0xc000309b88, {0xb51960, 0xc000310060}) /home/runner/work/oh-my-posh/oh-my-posh/src/font/cli.go:234 +0x3dc github.com/charmbracelet/bubbletea.(Program).eventLoop(0xc000281c00, {0xd43ae0?, 0xc000309b88?}, 0xc00002e840) /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.26.5/tea.go:412 +0x6c2 github.com/charmbracelet/bubbletea.(Program).Run(0xc000281c00) /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.26.5/tea.go:550 +0xa2e github.com/jandedobbeleer/oh-my-posh/src/font.Run({0xc00000a140, 0x5}, 0x0) /home/runner/work/oh-my-posh/oh-my-posh/src/font/cli.go:274 +0xb1 github.com/jandedobbeleer/oh-my-posh/src/cli.init.func3(0xc000280a00?, {0xc0003114d0?, 0x4?, 0xba7f42?}) /home/runner/work/oh-my-posh/oh-my-posh/src/cli/font.go:57 +0x1a5 github.com/spf13/cobra.(Command).execute(0x1310280, {0xc000311470, 0x3, 0x3}) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989 +0xab1 github.com/spf13/cobra.(Command).ExecuteC(0x13127e0) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 +0x3ff github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041 github.com/jandedobbeleer/oh-my-posh/src/cli.Execute() /home/runner/work/oh-my-posh/oh-my-posh/src/cli/root.go:38 +0x1a main.main() /home/runner/work/oh-my-posh/oh-my-posh/src/main.go:6 +0xf PS C:\Users\Johannes> ^I
Theme
tried to install a font, made the error above
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output