Skip to content

Commit

Permalink
Merge pull request #217 from JonathonReinhart/216-fix-crash-with-dash-l
Browse files Browse the repository at this point in the history
Fix bug causing crash when -l is used with a library needing to be modified by staticx
  • Loading branch information
JonathonReinhart authored Dec 3, 2021
2 parents ce61be4 + 27f07b7 commit 86298f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ This project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]
### Changed
- Change --debug option to appear in CLI help output
- Change `--debug` option to appear in CLI help output

### Fixed
- Fix bug sometimes causing a crash when `-l` is used ([#217])


## [0.13.5] - 2021-10-26
### Fixed
Expand Down Expand Up @@ -293,3 +297,4 @@ Initial release
[#204]: https://github.com/JonathonReinhart/staticx/pull/204
[#208]: https://github.com/JonathonReinhart/staticx/pull/208
[#210]: https://github.com/JonathonReinhart/staticx/pull/210
[#217]: https://github.com/JonathonReinhart/staticx/pull/217
3 changes: 1 addition & 2 deletions staticx/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, prog, strip=False, compress=True, debug=False, cleanup=True):
# Temporary output file (bootloader copy)
self.tmpoutput = None
self.tmpprog = None
self.tmpdir = None
self.tmpdir = mkdtemp(prefix='staticx-archive-')

f = NamedTemporaryFile(prefix='staticx-archive-', suffix='.tar')
self.sxar = SxArchive(fileobj=f, mode='w', compress=self.compress)
Expand Down Expand Up @@ -130,7 +130,6 @@ def generate(self, output):


# Build the archive to be appended
self.tmpdir = mkdtemp(prefix='staticx-archive-')
with self.sxar as ar:
run_hooks(self)

Expand Down

0 comments on commit 86298f6

Please sign in to comment.