Since c6fae8bb0e, when all discovery plugins are disabled, the postPatch phase contains shell code like > ( ) > plugins.yml which is invalid syntax. So make sure there's always at least one statement for the subshell, giving the expected empty file.
c6fae8bb0e