package.py : updated logic to log.py rework
Conflicts: lib/spack/spack/package.py
This commit is contained in:
parent
513cdd580e
commit
813cb032c4
1 changed files with 7 additions and 2 deletions
|
@ -203,8 +203,13 @@ def __exit__(self, exc_type, exception, traceback):
|
|||
# Flush the log to disk.
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
os.dup2(self._stdout, sys.stdout.fileno())
|
||||
os.dup2(self._stderr, sys.stderr.fileno())
|
||||
if self.directAssignment:
|
||||
# We seem to need this only to pass test/install.py
|
||||
sys.stdout = self._stdout
|
||||
sys.stderr = self._stderr
|
||||
else:
|
||||
os.dup2(self._stdout, sys.stdout.fileno())
|
||||
os.dup2(self._stderr, sys.stderr.fileno())
|
||||
|
||||
# restore output options.
|
||||
color._force_color = self._force_color
|
||||
|
|
Loading…
Reference in a new issue