macOS 27 Golden Gate supports otherwise if markers in an If statement, which is a major convenience. However, I wondered what happens if a shortcut with an otherwise if marker is run on macOS Tahoe or earlier. I don’t have access to a computer running Tahoe, and I wondered if someone would test this shortcut to see what happens. Many thanks!
As new actions are added to the Shortcuts app, there will have to be some way to test whether a computer’s macOS version is equal to or greater than some required version. The following will do this and only takes about 10 milliseconds to run. Including this in every posted script (when required) is cumbersome, but the user can easily eliminate these actions.
I get the impression from the error dialog in VikingOSX’s post that the error may occur when the shortcut is being installed. If that’s the case, the approach used above won’t work.
VikingOSX. The reason my earlier shortcut errored on your Tahoe computer is because it used otherwise if, which was added to the Shortcuts app in macOS 27.0. Or, at least, I assume the earlier shortcut failed for that reason.