Skip to content

envsubst -no-unset blows up on ${FOO:=} #61

Open
@filip-zyzniewski

Description

@filip-zyzniewski

It seems that an empty default value is treated as if a default value has not been provided.

Expected:

~ $ go install github.com/a8m/envsubst/cmd/[email protected]
~ $ go/bin/envsubst -no-unset <<< 'value: ${FOO:=}'
value: 
~ $ echo $?
0
~ $ 

Got:

~ $ go install github.com/a8m/envsubst/cmd/[email protected]
~ $ go/bin/envsubst -no-unset <<< 'value: ${FOO:=}' 
variable ${FOO} not set

~ $ echo $?
1
~ $

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions