Diff comments:

> diff --git a/tools/Z99-cloud-locale-test.sh b/tools/Z99-cloud-locale-test.sh
> index 4978d87..3ffaa2e 100644
> --- a/tools/Z99-cloud-locale-test.sh
> +++ b/tools/Z99-cloud-locale-test.sh
> @@ -11,8 +11,11 @@
>  #  of how to fix them.
>  
>  locale_warn() {
> -    local bad_names="" bad_lcs="" key="" val="" var="" vars="" bad_kv=""
> -    local w1 w2 w3 w4 remain
> +    [ -n "${KSH_VERSION}" ] &&

Instead of testing for ksh and inferring that "local" doesn't exist, we should 
instead just use your `command -v local` check so we can avoid checking for 
each shell that we know doesn't support local.

> +        typeset _local="typeset" || local _local="local"
> +
> +    $_local bad_names="" bad_lcs="" key="" val="" var="" vars="" bad_kv=""
> +    $_local w1 w2 w3 w4 remain
>  
>      # if shell is zsh, act like sh only for this function (-L).
>      # The behavior change will not permenently affect user's shell.


-- 
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/352010
Your team cloud-init commiters is requested to review the proposed merge of 
~smoser/cloud-init:fix/1784713-ksh-does-not-have-local into cloud-init:master.

_______________________________________________
Mailing list: https://launchpad.net/~cloud-init-dev
Post to     : cloud-init-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~cloud-init-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to