dockerize icon indicating copy to clipboard operation
dockerize copied to clipboard

validating that a value is set

Open ebertech opened this issue 8 years ago • 2 comments

I may be missing something obvious, but is there a way to error out if a variable substitution is blank?

I guess there's two approaches:

  1. inside the body of a predicate. seems simple enough though is probably verbose.
  2. if there is even one unfulfilled replacement, then error out.

I think this: https://golang.org/pkg/text/template/#Template.Option handles option 2 but would require a change in the dockerize args parsing and template handling.

ebertech avatar Dec 29 '17 18:12 ebertech

No way to do this currently. #93 might handle this though.

jwilder avatar Mar 17 '18 21:03 jwilder

@jwilder It would be really helpful if #93 was merged and released. Right now I need extra code to check if certain env variables are set. This is the last thing I need to completely replace envtpl with dockerize and remove the python dependency.

rlopezro avatar Mar 19 '18 06:03 rlopezro