Skip to content

Commit

Permalink
feat: print acbs output to stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
eatradish committed Aug 9, 2024
1 parent dc19e79 commit e26cc9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion acbs/deps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from collections import OrderedDict, defaultdict, deque
import sys
from typing import Deque, Dict, List

from acbs.find import find_package
Expand Down Expand Up @@ -55,7 +56,7 @@ def strongly_connected(search_path: str, packages_list: List[str], results: list
stack.append(vert)

# search package begin
print(f'[{len(results) + 1}/{len(pool)}] {vert:30}\r', end='', flush=True)
print(f'[{len(results) + 1}/{len(pool)}] {vert:30}\r', end='', flush=True, file=sys.stderr)
current_package = packages.get(vert)
if current_package is None:
package = pool.get(vert) or find_package(vert, search_path, '+stage2' if stage2 else '')
Expand Down
4 changes: 2 additions & 2 deletions acbs/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __init__(self, args) -> None:
def init(self) -> None:
sys.excepthook = self.acbs_except_hdr
print(full_line_banner(
f'Welcome to ACBS - {__version__}'))
f'Welcome to ACBS - {__version__}'), file=sys.stderr)
if self.debug:
log_verbosity = logging.DEBUG
else:
Expand Down Expand Up @@ -190,7 +190,7 @@ def build(self) -> None:
if not validate_package_name(i):
raise ValueError(f'Invalid package name: `{i}`')
logging.debug(f'Finding {i}...')
print(f'[{n + 1}/{len(self.build_queue)}] {i:30}\r', end='', flush=True)
print(f'[{n + 1}/{len(self.build_queue)}] {i:30}\r', end='', flush=True, file=sys.stderr)
package = find_package(i, self.tree_dir, modifiers, self.tmp_dir)
if not package:
raise RuntimeError(f'Could not find package {i}')
Expand Down

0 comments on commit e26cc9e

Please sign in to comment.