Readded logic to handle pre and post scripts from workspace

This commit is contained in:
2022-05-24 22:28:38 +02:00
parent f83755ac77
commit 7a65dbe39b
2 changed files with 34 additions and 6 deletions

View File

@@ -26,9 +26,11 @@ class CustomScriptService(CommandABC):
cmd = self._config.get_configuration('ACTIVE_EXECUTABLE')
for script in self._workspace.scripts:
if script == cmd:
command = self._workspace.scripts[script]
try:
subprocess.run(command, shell=True if os.name == 'posix' else None)
except Exception as e:
Console.error(str(e))
if script != cmd:
continue
command = self._workspace.scripts[script]
try:
subprocess.run(command, shell=True if os.name == 'posix' else None)
except Exception as e:
Console.error(str(e))