guild-operators icon indicating copy to clipboard operation
guild-operators copied to clipboard

[mithril] script update check uses hardcoded cncli.sh

Open TrevorBenson opened this issue 1 year ago • 1 comments

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.

TrevorBenson avatar Apr 14 '24 16:04 TrevorBenson

Dont see cncli.sh touched in linked PR based on description of this issue / linked PR

rdlrt avatar Apr 18 '24 14:04 rdlrt