guild-operators
guild-operators copied to clipboard
[mithril] script update check uses hardcoded cncli.sh
Describe the bug
The checkUpdate function uses dirname and basename, but the scripts (mithril-client and mithril-signer) that are calling it is passing in cncli.sh. This was copy/pasted from cncli.sh version of the check without modification.
Expected behavior The script should always be updating itself, not any other scripts.
Additional context I'll have a branch and PR ready for this later today once I return home. I'll review all scripts to determine if a general approach/improvement can be made.
On initial review I saw that checkUpdate() was using dirname/basename, but didnt pay close enough attention that it was $1, not $0, and therefore the values were always passed along and not presumed to be the script that actually called the function.
Dont see cncli.sh touched in linked PR based on description of this issue / linked PR