Skip to content

Conversation

@sweep-ai-deprecated
Copy link
Contributor

Description

This PR fixes an issue where the binary name is not recognized on Windows systems when the '.exe' extension is missing. The current behavior is that the program fails to find the binary file and prompts the user to specify the binary name flag with the extension. This PR modifies the code to automatically append the '.exe' extension to the binary name if the operating system is Windows and the extension is not already present.

Summary of Changes

  • Added a check in the 'main.go' file to determine if the operating system is Windows.
  • If the operating system is Windows, checked if the binary name ends with '.exe' using 'strings.HasSuffix'.
  • If the binary name does not end with '.exe', appended '.exe' to the binary name.
  • This ensures that the binary name is recognized correctly on Windows systems.

Fixes #2.


To checkout this PR branch, run the following command in your terminal:

git checkout sweep/fix-binary-name-issue

To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.

@sweep-ai-deprecated sweep-ai-deprecated bot added the sweep Assigns Sweep to an issue or pull request. label Aug 5, 2023
@yaonyan
Copy link
Owner

yaonyan commented Aug 5, 2023

Any other cases on macOS? Linux?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweep Assigns Sweep to an issue or pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Binary name shall use --name flag with .exe extension

1 participant