Explanation: Since Git doesn't support empty directories, the site directory doesn't exist when the repository is newly cloned. Running the gen step without the site directory present produces the following error, at least for me on macOS, causing the gen step to fail.
traderjoes: site: removeDirectoryRecursive:getSymbolicLinkStatus: does not exist (No such file or directory)
Solution: There are multiple approaches to solving this, e.g. by using a .gitkeep file. This particular change works by attempting site directory deletion if and only if the site directory already exists.
This change improves developer experience.
Explanation: Since Git doesn't support empty directories, the site directory doesn't exist when the repository is newly cloned. Running the gen step without the site directory present produces the following error, at least for me on macOS, causing the gen step to fail.
Solution: There are multiple approaches to solving this, e.g. by using a .gitkeep file. This particular change works by attempting site directory deletion if and only if the site directory already exists.