Thank you for great library 😀
I found two issues in get_dmg regexp.
Issue
1. This does not matches upper case name.
Default downloaded xcode file name was Xcode_${version}.xip,
but this expression does not match this so the cache doesn't work properly.
Currently the cache seems to work because of right below issue, but not really
2. without parentheses, the expression matches any xip extensions.
/^xcode_#{version}\.dmg|xip$/ -> /^xcode_#{version}\.dmg$/ or /^xip$/ -> :x: (Any xip extension will matches this)
/^xcode_#{version}\.(dmg|xip)$/ -> /^xcode_#{version}\.dmg$/ or /^xcode_#{version}\.xip$/ -> :o: What we are expected!
Thank you for great library 😀 I found two issues in get_dmg regexp.
Issue
1. This does not matches upper case name.
Default downloaded xcode file name was
Xcode_${version}.xip
, but this expression does not match this so the cache doesn't work properly. Currently the cache seems to work because of right below issue, but not really(maybe related to this PR https://github.com/xcpretty/xcode-install/pull/388.. But it has not been merged yet, so I included this change as well.)
2. without parentheses, the expression matches any xip extensions.
/^xcode_#{version}\.dmg|xip$/
->/^xcode_#{version}\.dmg$/
or/^xip$/
-> :x: (Any xip extension will matches this)/^xcode_#{version}\.(dmg|xip)$/
->/^xcode_#{version}\.dmg$/
or/^xcode_#{version}\.xip$/
-> :o: What we are expected!