Skip to content

Commit 07def4a

Browse files
Merge pull request livecode#3917 from livecodefraser/bugfix-16848
Don't write root-owned logs to the user's home on Linux
2 parents 16952a2 + dfe8a84 commit 07def4a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

builder/installer_utilities.livecodescript

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
script "InstallerUtilities"
1+
script "InstallerUtilities"
22
# This is the back-end installer, updater and uninstaller code.
33
# This code doesn't know anything about the product it is installing, and should be capable
44
# of being re-used for products other than LiveCode. It reads a "manifest" file, which contains
@@ -1522,7 +1522,12 @@ command log pMessage
15221522
local tFile
15231523
switch the platform
15241524
case "linux"
1525-
put $HOME & "/.runrev/logs/" & toLower(the uProduct of stack "Installer") & "_installer_log.txt" into tFile
1525+
if $EUID is zero then
1526+
put "~root/.runrev/logs" into tFile
1527+
else
1528+
put $HOME & "/.runrev/logs" into tFile
1529+
end if
1530+
put "/" & toLower(the uProduct of stack "Installer") & "_installer_log.txt" after tFile
15261531
break
15271532
case "macos"
15281533
put specialFolderPath("cusr") & "/Library/Logs/RunRev/" & the uProduct of stack "Installer" & "InstallerLog.txt" into tFile

docs/notes/bugfix-16848.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Fix Linux dictionary issues when running the installer as root
2+

0 commit comments

Comments
 (0)