mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
use direct attrib
This commit is contained in:
@@ -405,7 +405,7 @@ class AppConversationServiceBase(AppConversationService, ABC):
|
||||
# Check if there's an existing pre-commit hook
|
||||
with tempfile.TemporaryFile(mode='w+t') as temp_file:
|
||||
result = await workspace.file_download(PRE_COMMIT_HOOK, str(temp_file))
|
||||
if result.get('success'):
|
||||
if result.success:
|
||||
_logger.info('Preserving existing pre-commit hook')
|
||||
# an existing pre-commit hook exists
|
||||
if 'This hook was installed by OpenHands' not in temp_file.read():
|
||||
|
||||
Reference in New Issue
Block a user