Skip to content
Snippets Groups Projects
Commit e005735d authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Save sys.argv in our top-level temporary directory, in case it helps debug...

Save sys.argv in our top-level temporary directory, in case it helps debug errant temporary directories.

Ref: #234
parent ee581fd6
No related branches found
No related tags found
No related merge requests found
Pipeline #224191 failed
#
# diffoscope: in-depth comparison of files, archives, and directories
#
# Copyright © 2016-2020 Chris Lamb <lamby@debian.org>
# Copyright © 2016-2021 Chris Lamb <lamby@debian.org>
# Copyright © 2018 Mattia Rizzolo <mattia@debian.org>
#
# diffoscope is free software: you can redistribute it and/or modify
......@@ -18,6 +18,7 @@
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import os
import sys
import logging
import tempfile
......@@ -84,6 +85,9 @@ def _get_base_temporary_directory():
"Created top-level temporary directory: %s", _BASEDIR.name
)
with open(os.path.join(_BASEDIR.name, 'argv'), 'w') as f:
print('\n'.join(sys.argv), file=f)
return _BASEDIR.name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment