set the umask

main
Florent Daigniere 2 years ago
parent 0bde746610
commit c1062f3db2

@ -385,6 +385,7 @@ def config_export(full=False, secrets=False, color=False, dns=False, output=None
'dns': dns, 'dns': dns,
} }
old_umask = os.umask(0o077)
try: try:
schema = MailuSchema(only=only, context=context) schema = MailuSchema(only=only, context=context)
if as_json: if as_json:
@ -396,6 +397,8 @@ def config_export(full=False, secrets=False, color=False, dns=False, output=None
if msg := log.format_exception(exc): if msg := log.format_exception(exc):
raise click.ClickException(msg) from exc raise click.ClickException(msg) from exc
raise raise
finally:
os.umask(old_umask)
@mailu.command() @mailu.command()

Loading…
Cancel
Save