dex4er / asdf-envsubst

envsubst plugin for asdf
MIT License
0 stars 0 forks source link

Will randomly fail with cryptic error about bad arguments #2

Open pkit opened 6 months ago

pkit commented 6 months ago
flag provided but not defined: -variables
Usage: envsubst [options...] <input>
Options:
  -i         Specify file input, otherwise use last argument as input file.
             If no input file is specified, read from stdin.
  -o         Specify file output. If none is specified, write to stdout.
  -no-digit  Do not replace variables starting with a digit. e.g. $1 and ${1}
  -no-unset  Fail if a variable is not set.
  -no-empty  Fail if a variable is set but empty.
  -fail-fast Fail on first error otherwise display all failures if restrictions are set.
dex4er commented 6 months ago

It is fine: just don't run it without any arguments (-i and -o) or without redirection of stdin/stderr (envsubst < in > out)

pkit commented 6 months ago

It produces these errors while running other commands, not related to envsubst. Probably because envsubst is called somwhere else? I get it even in python sometimes. And a lot - for golang.

dex4er commented 6 months ago

Ah so it might be the reason that other tools expect 1:1 compatibility with original envsubst. I can suggest to use asdf plugin only when you call envsubst directly. Actually it is useful when you don't have gettext package installed: ie. you have minimal debian/ubuntu/alpine and you use asdf or mise to install all other dependencies for your app.

I don't think that https://github.com/a8m/envsubst is just generic substitution for gettext's envsubst.

Maybe you would like to fill the bug to the https://github.com/a8m/envsubst repo instead?

pkit commented 6 months ago

Hmm, I suppose they don't want to fix it, lol https://github.com/a8m/envsubst/issues/10