xcodes icon indicating copy to clipboard operation
xcodes copied to clipboard

--directory doesn't work

Open chipitsine opened this issue 3 years ago • 2 comments

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

chipitsine avatar Jul 01 '23 07:07 chipitsine

Are there any updates on this one?

mcaulifn avatar Mar 25 '24 14:03 mcaulifn

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

pyrtsa avatar Apr 11 '25 09:04 pyrtsa