Skip to content

Commit

Permalink
fix: unable to start when installed via BlackArch package
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Mar 26, 2022
1 parent d4985f2 commit 70250cc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
'''

import os
import shutil
import sys

from lib.cli import cmd, colors, console, core, futil, rlinit
Expand Down Expand Up @@ -59,7 +60,14 @@ def run():
os.system('clear')

if not os.path.isdir(core.MECROOT):
os.mkdir(core.MECROOT)
try:
# copy mec data from /usr/share, if installed via BlackArch package
shutil.copytree("/usr/share/massexpconsole", core.MECROOT)
except FileNotFoundError:
pass
except BaseException:
console.debug_except()

os.chdir(core.MECROOT)
console.print_banner(ver=core.get_version(),
exp_cnt=len(futil.list_exp()))
Expand All @@ -68,7 +76,6 @@ def run():
console.print_error('[-] Exiting...')
except FileNotFoundError:
console.debug_except()
console.print_error("[-] Please run install.py first")
sys.exit(1)
except BaseException:
console.print_error(
Expand Down

0 comments on commit 70250cc

Please sign in to comment.