summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/actions/update/main.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/actions/update/main.lua b/xmake/actions/update/main.lua
index dc8b3bcf0..adf5f6819 100644
--- a/xmake/actions/update/main.lua
+++ b/xmake/actions/update/main.lua
@@ -310,7 +310,8 @@ function _initialize_shell()
elseif shell:endswith("ksh") then target = "~/.kshrc"
elseif shell:endswith("fish") then target = "~/.config/fish/config.fish"
end
- command = "test -f \"$HOME/.xmake/profile\" && source \"$HOME/.xmake/profile\""
+ local profile_home = path.absolute("~/.xmake/profile")
+ command = ("test -f \"%s\" && source \"%s\""):format(profile_home, profile_home)
-- write home profile
local profile = "$XMAKE_PROGRAM_DIR/scripts/profile-unix.sh"
@@ -321,7 +322,7 @@ export PATH="$XMAKE_ROOTDIR:$PATH"
test $FISH_VERSION && test -f "%s" && source "%s" && exit 0
test -f "%s" && source "%s"
]], path.directory(os.programfile()), os.programdir(), profile_fish, profile_fish, profile, profile)
- io.writefile("~/.xmake/profile", bridge_command)
+ io.writefile(profile_home, bridge_command)
end
-- trace