mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 06:34:16 +00:00
show command to enter docker container in failed command output hint when IN_DOCKER=True
This commit is contained in:
parent
b9e05b2abe
commit
f775da299a
1 changed files with 6 additions and 0 deletions
|
@ -448,12 +448,18 @@ def log_archive_method_finished(result: "ArchiveResult"):
|
|||
for line in list(hints)[:5] if line.strip()
|
||||
)
|
||||
|
||||
docker_hints = ()
|
||||
if IN_DOCKER:
|
||||
docker_hints = (
|
||||
' docker run -it -v $PWD/data:/data archivebox/archivebox /bin/bash',
|
||||
)
|
||||
|
||||
# Collect and prefix output lines with indentation
|
||||
output_lines = [
|
||||
*hint_header,
|
||||
*hints,
|
||||
'{}Run to see full output:{}'.format(ANSI['lightred'], ANSI['reset']),
|
||||
*docker_hints,
|
||||
*([' cd {};'.format(result.pwd)] if result.pwd else []),
|
||||
' {}'.format(quoted_cmd),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue