pmadruga / react-native-clean-project

Automating the clean up of a React Native project
MIT License
1.17k stars 52 forks source link

Fix incorrect system cache pod clear command #53

Closed mikehardy closed 3 years ago

mikehardy commented 3 years ago

with sincere apologies @pmadruga for the lack of quality in my original PR, this is a lesson in "even when it looks trivial you really need to test it...", there was one more issue in the original PR

I swear it works now! (I actually used the dev-init / dev-sync tasks to prove it to myself this time)

Should be pod cache clean --all not pod cache clear --all

Related to #51

One thing worth mentioning is that executeTask() can reject, but in all the calls to it except the one for the brew update / brew upgrade pair, the possible rejection is not handled with a .catch() on executeTask - I think that will fast-fail the script in the future but for now node is just really noisy about how rejections should be handled

That's a bigger change though, maybe an executeTaskSimple wrapper that relies on the underlying success/fail reporting and assumes the caller never wants a rejection so eats them all, then call that most of the time?