Skip to content

Commit

Permalink
fix: docker image call cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
carderne committed Dec 21, 2023
1 parent fa69cd3 commit 54af3f5
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions sigexport/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ def main(
try:
from pysqlcipher3 import dbapi2 as _ # type: ignore[import] # noqa
except Exception:
secho("You set 'no-use-docker' but `pysqlcipher3` not installed properly, falling back to Docker")
use_docker = True
secho("You set 'no-use-docker' but `pysqlcipher3` not installed properly")
sys.exit(1)

if use_docker:
if not docker_image:
Expand All @@ -530,7 +530,15 @@ def main(
"Using Docker to extract data, this may take a while the first time!",
fg=colors.BLUE,
)
cmd = ["docker", "run", "--rm", f"--volume={src}:/Signal", docker_image]
cmd = [
"docker",
"run",
"--rm",
f"--volume={src}:/Signal",
docker_image,
"--no-use-docker",
"--print-data",
]
if manual:
cmd.append("--manual")
if chats:
Expand All @@ -540,7 +548,9 @@ def main(
if verbose:
cmd.append("--verbose")
try:
p = subprocess.run(cmd, capture_output=True, text=True, check=True, encoding="utf-8")
p = subprocess.run(
cmd, capture_output=True, text=True, check=True, encoding="utf-8"
)
docker_logs_1, data_raw, docker_logs_2 = p.stdout.split(DATA_DELIM)
except FileNotFoundError:
secho("Error: using Docker method, but is Docker installed?", fg=colors.RED)
Expand Down

0 comments on commit 54af3f5

Please sign in to comment.