mirror of
https://github.com/Mic92/nix-fast-build.git
synced 2024-08-17 21:50:26 +03:00
disable wait_stdin for now
This does not work yet
This commit is contained in:
parent
9b384a06bc
commit
ae50c356c2
@ -282,11 +282,7 @@ def stop_gracefully(proc: subprocess.Popen, timeout: int = 1) -> None:
|
||||
|
||||
@contextmanager
|
||||
def nix_output_monitor(fd: int) -> Iterator[subprocess.Popen]:
|
||||
# to avoid warnings in nom if no output is received
|
||||
def wait_stdin() -> None:
|
||||
select.select([fd], [], [])
|
||||
|
||||
proc = subprocess.Popen(["nom"], stdin=fd, preexec_fn=wait_stdin)
|
||||
proc = subprocess.Popen(["nom"], stdin=fd)
|
||||
try:
|
||||
yield proc
|
||||
finally:
|
||||
@ -304,10 +300,10 @@ def run_builds(stack: ExitStack, opts: Options) -> int:
|
||||
stdout = pipe.write_file
|
||||
builds: list[Build] = []
|
||||
for line in proc.stdout:
|
||||
if nom_proc is None:
|
||||
nom_proc = stack.enter_context(nix_output_monitor(pipe.read_file.fileno()))
|
||||
if opts.verbose:
|
||||
print(line, end="")
|
||||
if nom_proc is None:
|
||||
nom_proc = stack.enter_context(nix_output_monitor(pipe.read_file.fileno()))
|
||||
try:
|
||||
job = json.loads(line)
|
||||
except json.JSONDecodeError:
|
||||
|
Loading…
Reference in New Issue
Block a user