mirror of
https://github.com/ddworken/hishtory.git
synced 2025-07-01 13:11:22 +02:00
Support customizing HISHTORY_PATH for people who want to install hishtory in an alternate location to fix #54
This commit is contained in:
@ -692,9 +692,9 @@ func Update(ctx *context.Context) error {
|
||||
// Unlink the existing binary so we can overwrite it even though it is still running
|
||||
if runtime.GOOS == "linux" {
|
||||
homedir := hctx.GetHome(ctx)
|
||||
err = syscall.Unlink(path.Join(homedir, data.HISHTORY_PATH, "hishtory"))
|
||||
err = syscall.Unlink(path.Join(homedir, data.GetHishtoryPath(), "hishtory"))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to unlink %s for update: %v", path.Join(homedir, data.HISHTORY_PATH, "hishtory"), err)
|
||||
return fmt.Errorf("failed to unlink %s for update: %v", path.Join(homedir, data.GetHishtoryPath(), "hishtory"), err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user