jesseduffield/lazygit

read-only config conflicts with pop-up dismissal

開放

#818 建立於 2020年4月27日

 (4 則留言) (0 個反應) (0 位負責人)Go (2,990 個分叉)batch import
bughacktoberfest

倉庫指標

星標
 (81,412 顆星)
PR 合併指標
 (平均合併 3天 11小時) (30 天內合併 18 個 PR)

描述

Describe the bug I version my dotfiles with nix and home-manager, which puts immutable versions of all my config files into the right places for me. I've seen a lot of benefits from doing this, like being able to set my MBP up again in record time after Apple wipes it every time they have to replace the keyboard 🙄

Anyway, it turns out that this doesn't work for lazygit because it expects to be able to write the config file.

To Reproduce Make the config file read-only (chmod -w config.yml oughta do it) then try and dismiss the tracking or news popups.

Expected behavior The popups are dismissed and I can use lazygit normally.

Actual behavior

2020/04/27 14:48:52 An error occurred! Please create an issue at https://github.com/jesseduffield/lazygit/issues

*os.PathError open /Users/brianhicks/Library/Application Support/jesseduffield/lazygit/config.yml: permission denied
/private/tmp/nix-build-lazygit-0.18.drv-0/go/src/github.com/jesseduffield/lazygit/main.go:74 (0x16a1079)
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.14/share/go/src/runtime/proc.go:203 (0x1036c52)
/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-go-1.14/share/go/src/runtime/asm_amd64.s:1373 (0x1064631)

Desktop (please complete the following information):

  • OS: Mac
  • Lazygit Version: sigh looks like that's not in the Nix version. 😦 I'm building from nixpkgs 20.09pre221814.10100a97c89

Other Information I can get around this by setting reporting and startupPopupVersion in my config, which I've done, but I'm guessing that this'll come up everytime that version needs to increment.

貢獻者指南