Two fixes

This commit is contained in:
Zvonimir Sabljic
2023-08-16 13:54:41 +02:00
parent bbadcc5f6c
commit 25eff05f48
2 changed files with 8 additions and 2 deletions

View File

@@ -122,7 +122,11 @@ class Project:
.execute())
def get_full_file_path(self, file_path, file_name):
file_path = file_path.replace('./', '', 1).rsplit(file_name, 1)[0]
file_path = file_path.replace('./', '', 1)
if ' ' in file_name or '.' not in file_name:
file_name = ''
else:
file_path = file_path.rsplit(file_name, 1)[0]
if file_path.endswith('/'):
file_path = file_path.rstrip('/')

View File

@@ -77,7 +77,9 @@ def execute_command(project, command, timeout=None, force=False):
try:
while True and return_value is None:
elapsed_time = time.time() - start_time
print(colored(f'\rt: {round(elapsed_time * 1000)}ms : ', 'white', attrs=['bold']), end='', flush=True)
if timeout is not None:
print(colored(f'\rt: {round(elapsed_time * 1000)}ms : ', 'white', attrs=['bold']), end='', flush=True)
# Check if process has finished
if process.poll() is not None:
# Get remaining lines from the queue