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>
</requires>
<releases>
<release version="1.0.1" date="2022-09-03">
<release version="1.0.2" date="2022-09-03">
<description>
<p>First release</p>
</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
to be more modular.

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

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

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

@ -57,9 +57,13 @@ class Processor:
# write the output to the log file so the packager can see what
# happened during the installation process
with open(log_path, 'a') as log:
log.write(proc.stdout.decode('utf-8'))
log.flush()
try:
with open(log_path, 'a') as log:
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:
logger.critical(

Loading…
Cancel
Save