-
Notifications
You must be signed in to change notification settings - Fork 289
Cross-device link error when user directory is on external drive #1186
Description
Configuration
mas ▁▁▁▁ 5.0.2
slice ▁▁ arm64
slices ▁ arm64
dist ▁▁▁ homebrew/core/mas
origin ▁ https://github.com/mas-cli/mas.git
rev ▁▁▁▁ 9ba2cf5c435251c8459e55d7228c4ef896ed0e4f
swift ▁▁ 6.2.3 (swiftlang-6.2.3.3.21 clang-1700.6.3.2)
driver ▁ 1.127.14.1
store ▁▁ MY
region ▁ MY
macos ▁▁ 26.2 (25C56)
mac ▁▁▁▁ Mac16,10
cpu ▁▁▁▁ Apple M4
arch ▁▁▁ arm64
Bug description
When installing an app using mas with a macOS system installed on the internal drive but the user directory (~/) located on an external drive, the installation fails with repeated Cross-device link errors. The download completes, but the installation cannot proceed.
Steps to reproduce
Steps to Reproduce
1. macOS installed on an internal system drive.
2. User directory (~/) redirected to an external drive.
3. Run mas install for any app (tested with Command X, AppID: 6448461551).
Observed Behavior
mas outputs warnings and errors like:
Warning: Failed to link receipt for Command X (1.6.1) Error Domain=NSCocoaErrorDomain Code=512 "“receipt” couldn’t be linked to ... UserInfo=... {Error Domain=NSPOSIXErrorDomain Code=18 "Cross-device link"}" Warning: Failed to link pkg for Command X (1.6.1) Error Domain=NSCocoaErrorDomain Code=512 "“trc13223604233593363488.pkg” couldn’t be linked to ... {Error Domain=NSPOSIXErrorDomain Code=18 "Cross-device link"}" ... Error: Failed to find pkg to install Command X (1.6.1)
Expected Behavior
mas should install apps normally, regardless of whether the user directory is on the system drive or an external drive.
Additional Context
• System macOS version:
• mas version:
• Installation target: internal system drive
• User directory location: external drive
It seems mas attempts to link() downloaded pkg and receipt files to temporary directories, which fails if the source and destination are on different file systems (external vs internal drive).
Possible Workaround
Temporarily relocating the user directory or related temporary directories to the internal system drive allows installation to succeed.