Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix binary name issue on Windows #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Aug 5, 2023

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 sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Aug 5, 2023
@beetcb
Copy link
Owner

beetcb 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