xcodes
xcodes copied to clipboard
--directory doesn't work
Mac-2748:~ runner$ xcodes download 14.2.0 --directory=xc
Downloading with aria2 (/usr/local/bin/aria2c)
(1/1) Downloading Xcode 14.2.0+14C18: 99%
Xcode 14.2.0 has been downloaded to /Users/runner/Downloads/Xcode-14.2.0+14C18.xip
Mac-2748:~ runner$ ls xc
Mac-2748:~ runner$ rm Downloads/Xcode-14.2.0+14C18.xip
Mac-2748:~ runner$ xcodes download 14.2.0 --directory xc
Downloading with aria2 (/usr/local/bin/aria2c)
(1/1) Downloading Xcode 14.2.0+14C18: 99%
Xcode 14.2.0 has been downloaded to /Users/runner/Downloads/Xcode-14.2.0+14C18.xip
Mac-2748:~ runner$
file is stored in Downloads despite explicit --directory specified
Are there any updates on this one?
There's a simple fix in #422.
Looks like the --directory option required an absolute path to date and silently failed, falling back to $XCODES_DIRECTORY or ~/Downloads if the value wasn't an absolute path to an existing directory.
The fix is explained in the README of mxcl/Path.swift:
// paths are *always* absolute thus avoiding common bugs let path = Path(userInput) ?? Path.cwd/userInput