Skip to content

Commit

Permalink
set unassigned stdin to improve pyinstaller compatibility
Browse files Browse the repository at this point in the history
To create a window application with pyinstaller, all suprocess input and output streams must be assigned and must not be None.
https://stackoverflow.com/a/51706087/7076612
  • Loading branch information
smokephil authored and Byron committed Jan 21, 2022
1 parent b719e18 commit b3f873a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from subprocess import (
call,
Popen,
PIPE
PIPE,
DEVNULL
)
import subprocess
import threading
Expand Down Expand Up @@ -873,7 +874,7 @@ def execute(self,
env=env,
cwd=cwd,
bufsize=-1,
stdin=istream,
stdin=istream or DEVNULL,
stderr=PIPE,
stdout=stdout_sink,
shell=shell is not None and shell or self.USE_SHELL,
Expand Down

0 comments on commit b3f873a

Please sign in to comment.