Sophisticated chroot/build/flash tool to develop and install postmarketOS

  • Oliver Smith's avatar
    Fix crash from mixing 'sudo' with 'du' output (!1777) · 8b8a73e8
    Oliver Smith authored
    Do not crash during "pmbootstrap zap" and other actions when the user
    needs to type in the sudo password before running "du" to calculate the
    work folder size. We're trying to parse the "du" output as integer, but
    of course the 'Sorry, try again' message from sudo is not a valid
    integer.
    
    $ pmbootstrap --details-to-stdout zap
    (008707) [14:00:57] Shutdown complete
    (008707) [14:00:57] Calculate work folder size
    (008707) [14:00:57] % sudo du --summarize --block-size=1 /home/luca/.local/var/pmbootstrap
    [sudo] password for luca:
    [sudo] password for luca: Sorry, try again.
    
    12966293504     /home/luca/.local/var/pmbootstrap
    (008707) [14:01:03] ERROR: invalid literal for int() with base 10: 'Sorry, try again.\n12966293504'
    
    It would be a good idea to separate the sudo output from the process
    output in general, see #1677 for a related proposal.
    8b8a73e8
Name
Last commit
Last update
.gitlab Loading commit data...
helpers Loading commit data...
pmb Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
MANIFEST.in Loading commit data...
README.md Loading commit data...
pmbootstrap.py Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...