So this might not be helpful for this particular issue (or maybe it is?) but maybe someone else reading it could benefit.
I was also having trouble updating my site last night, with basically the same error message:
Pups::ExecError: cd /var/www/discourse ....
I isolated the cause to two plugins I wrote. I was using the Discourse Signature plugin as boilerplate code to learn how to write plugins at the time. Because I was following it as an example, my two plugins also had this issue that was blocking update:
https://github.com/discourse/discourse-signatures/commit/830ea225df0e5d8de1c40cf3aa16439c7e182cc8
Commenting out the plugin lines in my yml file worked. Removing the same line on the plugin repos also fixed the issue and allowed me to update.