Closed bitboxer closed 1 year ago
My guess is this should be:
... [ "${ASDF_NODEJS_FORCE_COMPILE:-}" ]; ...
The ${VAR:-}
is a common pattern when VAR
may be undefined.
@augustobmoura can you take a look at this?
Not a typo, the ${variable-word}
expansion means that word will be expanded if
and only if the variable is unset, the ${variable:-word}
syntax means that
word will be expanded if the variable is unset or is an empty value.
On this case we only need to check for unset, as we are trying to avoid an error of referencing unset variables
I think the
-
afterASDF_NODEJS_FORCE_COMPILE
is wrong. When I remove it, it forces compilation. With it, it does not:https://github.com/asdf-vm/asdf-nodejs/blob/4f8aa3d9ebeb626c6905f6456c5ded13b06b59ab/bin/install#L14