[PATCH] dim: fix shellcheck warning in ask_user
Daniel Vetter
daniel at ffwll.ch
Wed Jan 16 11:48:40 UTC 2019
On Wed, Jan 16, 2019 at 01:34:56PM +0200, Jani Nikula wrote:
> Fix:
>
> local prompt="$@ (y/N) "
> ^-- SC2124: Assigning an array to a string! Assign as
> array, or use * instead of @ to concatenate.
>
> Reported-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> Fixes: b5403812b664 ("dim: ask the user to create DIM_PREFIX and clone DIM_REPO")
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
> dim | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dim b/dim
> index 7a5136c5db26..af6b4ca679a4 100755
> --- a/dim
> +++ b/dim
> @@ -157,7 +157,7 @@ function pause
>
> function ask_user
> {
> - local prompt="$@ (y/N) "
> + local prompt="$* (y/N) "
>
> read -n 1 -rsp "$prompt"
> echo
> --
> 2.20.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dim-tools
mailing list