mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-03-04 00:01:12 -05:00
Install files to executable directory instead of working directory #2865
Labels
No labels
P1: Critical
P2: High
P3: Medium
P4: Low
UI
bug
cannot reproduce
compatibility
dependencies
docker
documentation
duplicate
enhancement
enhancement
external libs
feature request
good first issue
help wanted
infrastructure
invalid
localization
needs investigation
performance
potential-duplicate
question
recurrent
research
snap
waiting for data
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AdGuardHome#2865
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MichaIng on GitHub (Jun 24, 2021).
Have a question or an idea? Please search it on our forum to make sure it was not yet asked. If you cannot find what you had in mind, please submit it here.
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Problem Description
The updater currently installs files to the working directory: https://github.com/AdguardTeam/AdGuardHome/blob/master/internal/updater/updater.go#L249-L274
By default the working directory matches the executable directory, but using the
-w, --work-diroption changes this, so that files are tried to be installed to the wrong directory.Proposed Solution
Instead of deriving the target directory from the working directory, the updater could use the location of the running AdGuard Home executable itself, so that the working directory can be changed without breaking the updater.
Alternatives Considered
I'm not sure whether there is already some kind of bin dir implemented that can be used, or otherwise if there is a different way to change the location of config and data without breaking the updater. But it doesn't seem intended to me that
-w, --work-dirinherently breaks it.Additional Information
We use the
-w, --work-diroption in our implementation to separate the static binary and install files from variable user data and config, but the updater then fails.@ainar-g commented on GitHub (Jun 25, 2021):
Hi, and thanks for the report. There are several ongoing developments wrt the updater and directory evaluation, most notably #2630 and #2902. We'll look at the issue at hand during or after we've handled those.
@MichaIng commented on GitHub (Jun 25, 2021):
Many thanks. There is no way to disable the updater while keeping the update check/notification enabled, right?
@ainar-g commented on GitHub (Jun 25, 2021):
I don't think so.