Author erlendaasland
Recipients christian.heimes, erlendaasland, miss-islington, pablogsal
Date 2021-12-07.23:05:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638918324.89.0.801032815948.issue45847@roundup.psfhosted.org>
In-reply-to
Content
Quoting msg407949:
> [...] We should do something like
>
>   ZLIB_CFLAGS=${ZLIB_CFLAGS:-""}
>   ZLIB_LIBS=${ZLIB_LIBS:-"-lz"}
>
> for all env vars.

I think we should use ${VAR-default} instead of ${VAR:-default}; we only want to override if the variable is _not_ set:

    $ TEST=
    $ echo ${TEST-default}
    
    $ echo ${TEST:-default}
    default
    $ unset TEST
    $ echo ${TEST-default} 
    default
    $ echo ${TEST:-default}
    default


> I prefer the syntax over ${ZLIB_CFLAGS:=""} because it is more obvious what
> is happening.

I agree. I also prefer `TEST=${TEST-""}` to `TEST=${TEST-}` for empty strings.
History
Date User Action Args
2021-12-07 23:05:24erlendaaslandsetrecipients: + erlendaasland, christian.heimes, pablogsal, miss-islington
2021-12-07 23:05:24erlendaaslandsetmessageid: <1638918324.89.0.801032815948.issue45847@roundup.psfhosted.org>
2021-12-07 23:05:24erlendaaslandlinkissue45847 messages
2021-12-07 23:05:24erlendaaslandcreate