cloud-native-toolkit / itzcli

Go Implementation of an IBM Technology Zone (https://techzone.ibm.com) CLI
MIT License
4 stars 1 forks source link

bugfix/newresourcefilecheck #9

Closed David-M-IBM closed 1 year ago

David-M-IBM commented 1 year ago

Changed NewBinaryFileCheck to NewResourceFileCheck and added OneExistsOnPath and ExistsOnPath as checker functions to determine path.

This is to address issue #511

@nathanagood The ExistsOnPath function uses exec.LookPath(name) which returns a full path (including the name) to the binary. I removed the length of the name from the path string, but this might not work in weird edge cases like an invisible ASCII character.