Hi — thanks for maintaining this tool.
I ran into an issue on a Mac where the current user’s home directory is not under /Users. The account is configured normally in Directory Services:
id -un
# oliver
echo "$HOME"
# /Volumes/some_personal_volume/Users/oliver
dscl . -read /Users/oliver NFSHomeDirectory
# NFSHomeDirectory: /Volumes/some_personal_volume/Users/oliver
But running:
default-browser --identifier net.waterfox.waterfox
fails with: "Error: mkdir /Users/oliver: permission denied"
From a quick look, it appears that default-browser constructs the LaunchServices plist path using /Users/<username>/Library/... rather than resolving the current user’s actual home directory.
Would you consider using the user’s real home directory, for example via os/user.Current().HomeDir or similar, instead of assuming /Users/<username>?
This would make the tool work for macOS accounts whose NFSHomeDirectory points to another volume.
Hi — thanks for maintaining this tool.
I ran into an issue on a Mac where the current user’s home directory is not under /Users. The account is configured normally in Directory Services:
But running:
default-browser --identifier net.waterfox.waterfoxfails with: "Error: mkdir /Users/oliver: permission denied"
From a quick look, it appears that
default-browserconstructs the LaunchServices plist path using/Users/<username>/Library/...rather than resolving the current user’s actual home directory.Would you consider using the user’s real home directory, for example via
os/user.Current().HomeDiror similar, instead of assuming/Users/<username>?This would make the tool work for macOS accounts whose
NFSHomeDirectorypoints to another volume.