Skip to content

Commit

Permalink
Fix command line args bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zackelia committed Nov 11, 2020
1 parent f0db17a commit c3f4067
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
help="The installation path for Ghidra")
args = parser.parse_args()

# Ghidra cannot be running during the installation
if subprocess.run(["pgrep", "-f", "ghidra"], stdout=subprocess.PIPE).returncode == 0:
# Ghidra cannot be running during the installation, also ignore our own process
# if ghidra is in an argument
p = subprocess.run(["pgrep", "-f", "ghidra"], stdout=subprocess.PIPE)
if p.returncode == 0 and p.stdout.strip() != str(os.getpid()).encode():
print("Please close any running Ghidra instances")
exit(-1)

Expand Down

0 comments on commit c3f4067

Please sign in to comment.