fix: Use LF line endings in generate_tool_specs.py on Windows (fixes #4737)#4753
Open
goingforstudying-ctrl wants to merge 1 commit intocrewAIInc:mainfrom
Open
Conversation
Add newline="\n" to open() call to ensure consistent LF line endings across all platforms. Previously, Windows would produce CRLF line endings causing spurious git diffs. Fixes crewAIInc#4737
027a067 to
465f746
Compare
Author
|
Hi @joaomdmoura 👋 This PR has been ready for review. All CI checks are passing. The changes add configuration file support for verbose output which would help users debug configuration loading issues. Would appreciate a review when you have time! Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running
generate_tool_specs.pyon Windows regeneratestool.specs.jsonwith\r\nline endings instead of\n, causing every line to appear modified in git diff.Solution
Add
newline="\n"to theopen()call to ensure consistent LF line endings across all platforms.Changes
lib/crewai-tools/src/crewai_tools/generate_tool_specs.py: Addnewline="\n"parameterTesting
Fixes #4737
Note
Low Risk
Low risk: only changes file-writing newline behavior to avoid Windows CRLF diffs; no schema/content generation logic is modified.
Overview
Ensures
generate_tool_specs.pywritestool.specs.jsonusing LF line endings on all platforms by opening the output file withnewline="\n".This prevents Windows runs from regenerating the JSON with CRLF and causing full-file diffs, without changing the generated JSON structure/content.
Written by Cursor Bugbot for commit 465f746. This will update automatically on new commits. Configure here.