diff --git a/pmb/__init__.py b/pmb/__init__.py index ab06488a..ea5e1ce7 100644 --- a/pmb/__init__.py +++ b/pmb/__init__.py @@ -65,7 +65,12 @@ def main(): except Exception as e: logging.info("ERROR: " + str(e)) - logging.info("Run 'pmbootstrap log' for details.") + if os.path.exists(args.log): + logging.info("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:") + logging.info(" pmbootstrap --details-to-stdout init") logging.info("See also: ") logging.debug(traceback.format_exc()) return 1 diff --git a/pmb/config/init.py b/pmb/config/init.py index 3a044dad..293e2501 100644 --- a/pmb/config/init.py +++ b/pmb/config/init.py @@ -201,6 +201,9 @@ def ask_for_build_options(args, cfg): def frontend(args): cfg = pmb.config.load(args) + # Work folder (needs to be first, so boot.img analyze works: #1066) + cfg["pmbootstrap"]["work"] = args.work = ask_for_work_path(args) + # Device cfg["pmbootstrap"]["device"], device_exists = ask_for_device(args) @@ -217,11 +220,8 @@ def frontend(args): cfg["pmbootstrap"]["user"] = pmb.helpers.cli.ask(args, "Username", None, args.user, False, "[a-z_][a-z0-9_-]*") - # UI and work folder + # UI and various build options cfg["pmbootstrap"]["ui"] = ask_for_ui(args) - cfg["pmbootstrap"]["work"] = ask_for_work_path(args) - - # Various build options ask_for_build_options(args, cfg) # Extra packages to be installed to rootfs