Fixing Dockutil removal of default Dock apps at first login
A first-login Mac setup used to prepare the Dock after initial setup. The chosen apps were added correctly, but the `--remove all` command did not remove the default Dock items. One idea was to place a spacer after the managed Dock items and let people remove the unwanted default apps themselves.
The working fix was to remove an unnecessary first part of the line that was meant to clear all apps. The script waits until is finished, then checks that Finder is running before changing the Dock.
Key points
- successfully added the desired apps to the Dock.
- The `--remove all` command initially failed to delete the default Dock items.
- The fix was to remove an unnecessary first part of the line used for clearing apps.
- The script waits for to finish before continuing.
- The script also waits for Finder before applying Dock changes.