mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
fix: handle file watcher operations only when it exists
This commit is contained in:
parent
41e6fb961b
commit
a04b9ea053
1 changed files with 6 additions and 3 deletions
|
@ -455,7 +455,7 @@ class InputOutput:
|
|||
self.placeholder = None
|
||||
|
||||
self.interrupted = False
|
||||
if not multiline_input:
|
||||
if not multiline_input and self.file_watcher:
|
||||
self.file_watcher.start()
|
||||
|
||||
line = self.prompt_session.prompt(
|
||||
|
@ -478,12 +478,15 @@ class InputOutput:
|
|||
except EOFError:
|
||||
return ""
|
||||
except Exception as err:
|
||||
dump(err)
|
||||
self.tool_error(str(err))
|
||||
# print the traceback ai!
|
||||
return ""
|
||||
except UnicodeEncodeError as err:
|
||||
self.tool_error(str(err))
|
||||
return ""
|
||||
finally:
|
||||
self.file_watcher.stop()
|
||||
if self.file_watcher:
|
||||
self.file_watcher.stop()
|
||||
|
||||
if line.strip("\r\n") and not multiline_input:
|
||||
stripped = line.strip("\r\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue