make the wizard proceed even without a log path

main
Mirko Brombin 2 years ago
parent e21a97ad1e
commit b998f15323

@ -1 +1 @@
1.0.1 1.0.2

@ -21,7 +21,7 @@
<display_length compare="ge">768</display_length> <display_length compare="ge">768</display_length>
</requires> </requires>
<releases> <releases>
<release version="1.0.1" date="2022-09-03"> <release version="1.0.2" date="2022-09-03">
<description> <description>
<p>First release</p> <p>First release</p>
</description> </description>

2
debian/changelog vendored

@ -1,4 +1,4 @@
vanilla-first-setup (1.0.1) jammy; urgency=low vanilla-first-setup (1.0.2) jammy; urgency=low
* Rewrite from scratch to support custom recipes and * Rewrite from scratch to support custom recipes and
to be more modular. to be more modular.

@ -0,0 +1 @@
# Vanilla First Setup Log FIle

@ -1,5 +1,5 @@
project('io.github.vanilla-os.FirstSetup', project('io.github.vanilla-os.FirstSetup',
version: '1.0.1', version: '1.0.2',
meson_version: '>= 0.59.0', meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2', default_options: [ 'warning_level=2',
'werror=false', 'werror=false',

@ -63,8 +63,8 @@ class Builder:
try: try:
open(log_path, 'a').close() open(log_path, 'a').close()
except OSError: except OSError:
logger.critical("failed to create log file: %s" % log_path) logger.warning("failed to create log file: %s" % log_path)
sys.exit(1) logging.warning("No log will be stored.")
for key, step in self.__recipe.raw["steps"].items(): for key, step in self.__recipe.raw["steps"].items():
if step["template"] in templates: if step["template"] in templates:

@ -57,9 +57,13 @@ class Processor:
# write the output to the log file so the packager can see what # write the output to the log file so the packager can see what
# happened during the installation process # happened during the installation process
with open(log_path, 'a') as log: try:
log.write(proc.stdout.decode('utf-8')) with open(log_path, 'a') as log:
log.flush() log.write(proc.stdout.decode('utf-8'))
log.flush()
except Exception as e:
logger.warning("failed to write to the log file: %s" % e)
logger.warning("the output of the commands is: %s" % proc.stdout)
if proc.returncode != 0: if proc.returncode != 0:
logger.critical( logger.critical(

Loading…
Cancel
Save