Open webknjaz opened 2 weeks ago
The folder presence check in the VM reports that it exists which is why the role skips attempting to install it:
administrator@ansible-core-ci-template-macos-15 ~ % stat /Library/Developer/CommandLineTools
16777220 12884908127 drwxr-xr-x 3 root wheel 0 96 "Jun 6 09:09:55 2024" "Jun 6 09:09:55 2024" "Jun 13 00:35:27 2024" "Jun 6 09:09:55 2024" 4096 0 0 /Library/Developer/CommandLineTools
Looks like we need to come up with a better check.
By the way, I made an installer image of macOS 15 through this great tool https://github.com/ninxsoft/mist-cli.
administrator@ansible-core-ci-template-macos-15 ~ % ls -alh /Library/Developer/CommandLineTools
total 0
drwxr-xr-x 3 root wheel 96B Jun 6 09:09 .
drwxr-xr-x 3 root wheel 96B Jun 6 09:09 ..
-rw-r--r-- 1 root wheel 2B Jun 6 09:09 .beta
administrator@ansible-core-ci-template-macos-15 ~ % file /Library/Developer/CommandLineTools/.beta
/Library/Developer/CommandLineTools/.beta: ASCII text
administrator@ansible-core-ci-template-macos-15 ~ % cat /Library/Developer/CommandLineTools/.beta
1
I performed sudo mv /Library/Developer/CommandLineTools{,.bak}
to work around the issue for now.
Looking at https://mac.install.guide/commandlinetools/2, I think that the pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
option is the most robust.
There's also some quirks, it seems: https://stackoverflow.com/a/75425459/595220
By the way, I made an installer image of macOS 15 through this great tool
I was wondering how you got a macOS 15 installer so fast. That's a really neat tool.
It looks like for the beta version the folder is created with that single hidden dot file. Maybe we could check for a file inside /Library/Developer/CommandLineTools/
. That first article suggested looking for /Library/Developer/CommandLineTools/usr/bin/git
, but we could probably use anything in there.
Changing _macos_cli_tools_dir
to a sub dir is probably be the simplest fix. Might need to change that variable name as well to indicate the changed purpose.
Here's the log, I haven't yet attempted debugging so I'll just start a tracking issue FTR: