Skip to content

Commit c8bf9d2

Browse files
fix setup post install cmd
1 parent a778c15 commit c8bf9d2

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

setup.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@
22

33
from setuptools import setup, find_packages
44

5-
from pathlib import Path
6-
75
from setuptools.command.install import install as _install
86

97

108
def _post_install():
119
from subprocess import getstatusoutput
12-
_, out = getstatusoutput('activate-global-python-argcomplete;env')
10+
_, out = getstatusoutput('activate-global-python-argcomplete --user')
1311
print(out)
1412

15-
if "zsh" in os.environ.get("SHELL", ""):
16-
path = f"{os.environ.get('HOME')}/.zshenv"
17-
else:
18-
path = f"{os.environ.get('HOME')}/.bash_completion"
19-
if os.path.isfile(path):
20-
_, out = getstatusoutput(f'source {path}')
13+
if os.environ.get("SHELL") and os.environ.get("HOME"):
14+
if "zsh" in os.environ.get("SHELL", ""):
15+
path = f"{os.environ.get('HOME')}/.zshenv"
16+
else:
17+
path = f"{os.environ.get('HOME')}/.bash_completion"
18+
if os.path.isfile(path):
19+
_, out = getstatusoutput(f'source {path}')
2120

2221

2322
class install(_install):

simplyblock_core/env_var

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SIMPLY_BLOCK_COMMAND_NAME=sbcli-dev
2-
SIMPLY_BLOCK_VERSION=10.1.69
2+
SIMPLY_BLOCK_VERSION=10.1.70
33

44
SIMPLY_BLOCK_DOCKER_IMAGE=simplyblock/simplyblock:main
55
DOCKER_USER=hamdysimplyblock

0 commit comments

Comments
 (0)