Supaya bisa pindah ke workspace yang nama directory-nya pakai spasi

This commit is contained in:
Dita Aji Pratama 2026-08-04 20:20:21 +07:00
parent b6ae0f9b3b
commit 6617d6222b

View File

@ -116,7 +116,7 @@ schema_run_bash = {
def run_bash(command):
try:
# Prepend 'cd' to the command to ensure it runs in the correct workspace
full_command = f"cd {get_current_workspace()} && {command}"
full_command = f"cd '{get_current_workspace()}' && {command}"
result = subprocess.run(full_command, shell=True, capture_output=True, text=True, timeout=30)
return f"stdout:\n{result.stdout}\nstderr:\n{result.stderr}\nreturn code: {result.returncode}"
except Exception as e: