Closed brain-hol closed 1 year ago
@brain-hol thank you for reporting this! Please validate the fix is working as expected. We should probably write unit tests for this and run them in our pipeline, which runs on all the target platforms. But that will be an effort I couldn't take on right now.
Frodo CLI version
This is actually running from the binary, not NPM.
Describe the issue
The current implementation of
frodo-cli
lacks proper handling of binary detection on Windows. The code checks if the command name matchesfrodo
, indicating that it's being run from a binary. However, on Windows, the executable name will befrodo.exe
instead of justfrodo
.Here's the relevant code snippet that performs the binary detection:
https://github.com/rockcarver/frodo-cli/blob/f66677899882c607e4d5551e352f073360cc2cbe/src/utils/Version.ts#L127-L129
As a result, when running
frodo
on Windows, the process incorrectly assumes it is not a binary, potentially leading to unexpected behavior or errors. For example, binary version comparison is not being handled correctly (related to #266).To address this issue, the binary detection logic should be modified to handle both
frodo
andfrodo.exe
as valid binary names. This ensures consistent behavior across different platforms.