Failed to update config file on windows
Created by: matthiasng
Running glab config -t ...
failes with Failed to update config file: chmod C:\Users\...\AppData\Local\Temp\..env337738213: not supported by windows
Description https://github.com/profclems/glab/blob/3ff88b6ea5bb8e2aba83d6e29f9cefac533a0979/internal/config/config.go#L162 renameio.WriteFile uses File.Chmod which is not supported on windows.
Expected Behavior
glab config
command can write the config file
Actual Behavior
glab config
failes when writing the config file
Possible Fix Remove renameio and add some error handling to the open-write go code. I think that should be enough to guarantee (99.99... %) not to destroy the config file. @andhe please correct me if i'm wrong. Alternative, fix https://github.com/google/renameio/issues/17
Steps to Reproduce
- run
glab config -t 123
Your Environment
- Version used: Branch:trunk
- Operating System and version: Windows 10