Commit 1cb66c7
committed
Remove obsolete x-prefix from installation script comparison
From https://github.com/koalaman/shellcheck/wiki/SC2268
> Some older shells would get confused if the first argument started with a dash, or consisted of ! or (. As a
> workaround, people would prefix variables and values to be compared with x to ensure the left-hand side always started
> with an alphanumeric character.
>
> POSIX ensures this is not necessary, and all modern shells now follow suite.
This obsolete practice is used by the template installation script in a comparison of the release's Git tag name. Since
it would be extremely unusual to start a tag name with any of these characters (or impossible in the case of `-`, since
it is prohibited by Git), it's unlikely this would be necessary even in the days when this bug was prevalent in shells.
In addition, this bug was fixed quite some years ago, making it unlikely that it even exists on any user's system.
So this practice makes the script code more complex without providing any real benefit. Since it is a violation of
ShellCheck rule SC2268 and causing a CI failure, it is best to just remove it.1 parent 3edc9f6 commit 1cb66c7
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
0 commit comments