mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-23 08:45:16 +01:00
mkdir ~/.config/fish if it doesn't exist yet
This commit is contained in:
parent
54679dc2db
commit
2ee050a629
@ -578,6 +578,10 @@ func configureFish(homedir, binaryPath string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// Add to fishrc
|
// Add to fishrc
|
||||||
|
err = os.MkdirAll(path.Join(homedir, ".config/fish"), 0o744)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to create fish config directory: %v", err)
|
||||||
|
}
|
||||||
f, err := os.OpenFile(path.Join(homedir, ".config/fish/config.fish"), os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0o644)
|
f, err := os.OpenFile(path.Join(homedir, ".config/fish/config.fish"), os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0o644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to append to ~/.config/fish/config.fish: %v", err)
|
return fmt.Errorf("failed to append to ~/.config/fish/config.fish: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user