0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-15 21:07:15 +03:00

Refine environment var

Address some review comments
This commit is contained in:
yuhan6665
2023-10-28 18:21:57 -04:00
parent 999bdc58d3
commit 11b61b02c8
4 changed files with 26 additions and 31 deletions

View File

@ -17,13 +17,13 @@ func LineSeparator() string {
}
func GetToolLocation(file string) string {
toolPath := NewEnvFlag(UnixToolLocation).GetValue(getExecutableDir)
toolPath := NewEnvFlag(ToolLocation).GetValue(getExecutableDir)
return filepath.Join(toolPath, file)
}
// GetAssetLocation searches for `file` in certain locations
func GetAssetLocation(file string) string {
assetPath := NewEnvFlag(UnixAssetLocation).GetValue(getExecutableDir)
assetPath := NewEnvFlag(AssetLocation).GetValue(getExecutableDir)
defPath := filepath.Join(assetPath, file)
for _, p := range []string{
defPath,