Added run command & tools/set-version project
This commit is contained in:
@@ -35,8 +35,6 @@ class LiveServerThread(threading.Thread):
|
||||
self._command = []
|
||||
self._env_vars = os.environ
|
||||
|
||||
self._set_venv()
|
||||
|
||||
@property
|
||||
def command(self) -> list[str]:
|
||||
return self._command
|
||||
@@ -45,16 +43,6 @@ class LiveServerThread(threading.Thread):
|
||||
def main(self) -> str:
|
||||
return self._main
|
||||
|
||||
def _set_venv(self):
|
||||
if self._executable != sys.executable:
|
||||
path = os.path.abspath(os.path.dirname(os.path.dirname(self._executable)))
|
||||
if sys.platform == 'win32':
|
||||
self._env_vars['PATH'] = f'{path}\\bin' + os.pathsep + os.environ.get('PATH', '')
|
||||
else:
|
||||
self._env_vars['PATH'] = f'{path}/bin' + os.pathsep + os.environ.get('PATH', '')
|
||||
|
||||
self._env_vars['VIRTUAL_ENV'] = path
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
Starts the CPL project
|
||||
|
||||
Reference in New Issue
Block a user