Skip to content

Commit

Permalink
fix: added checks to sqlite3 and pip (#1585)
Browse files Browse the repository at this point in the history
* fix: added checks to sqlite3 and pip

* fix: changed the check for sqlite3

* Merge branch 'development' into aimmo_setup
  • Loading branch information
KamilPawel committed Nov 18, 2021
1 parent f24dafb commit ec08765
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion aimmo_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@ def ensure_homebrew_installed(os_type, arch_type):

def install_sqlite3(os_type, arch_type):
if os_type == OSType.MAC:
try:
if _cmd("sqlite3 -version", "check_sqlite3")[0] == 0:
return
except CalledProcessError:
pass

_cmd("brew install sqlite3")


Expand Down Expand Up @@ -469,7 +475,12 @@ def helm_install_aimmo(os_type, arch_type):

def install_pip(os_type, arch_type):
if os_type == OSType.LINUX:
_cmd("sudo apt-get install python3-pip")
try:
if _cmd("pip --version", "check_pip")[0] == 0:
return
except CalledProcessError:
pass
_cmd("sudo apt-get install python3-pip", "install_pip")


def install_nodejs(os_type, arch_type):
Expand Down

0 comments on commit ec08765

Please sign in to comment.