mirror of
https://github.com/OMGeeky/gpt-pilot.git
synced 2026-02-23 15:49:50 +01:00
Two fixes
This commit is contained in:
@@ -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('/')
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user