Only print 'pmbootstrap log' msg to stdout (#1453)

Prevent the "Run 'pmbootstrap log' for details" message from being
written to the log file that gets read with "pmbootstrap log". Because
when the output of "pmbootstrap log" is pasted somewhere and people
analyze it, the message sounds like this is not the output of
"pmbootstrap log" (like it happened the other day in #postmarketOS).
This commit is contained in:
Oliver Smith 2018-05-01 00:22:16 +00:00 committed by GitHub
parent 827a60cd25
commit 543705262b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -68,7 +68,8 @@ def main():
except Exception as e:
logging.info("ERROR: " + str(e))
if os.path.exists(args.log):
logging.info("Run 'pmbootstrap log' for details.")
# Hint to read the log file (only gets printed to stdout)
print("Run 'pmbootstrap log' for details.")
else:
logging.info("Crashed before the log file was created.")
logging.info("Running init again like the following gives more details:")