Skip to content

Variable Interpolation appears to ignore required = true #676

@ifedorenko

Description

@ifedorenko

As a user, I expect the code below to trigger MissingParameterException if neither --mypath parameter nor $MYPATH environment variable are set at runtime. Currently the parameter value is set to null.

	@Option(names="--mypath", defaultValue = "${env:MYPATH}", required = true)
	private String path;

Note that I don't specifically care to use defaultValue annotation attribute, I just need a way to populate parameter value from --mypath or $MYPATH.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions