You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case because I don't have control on this ENV variable, Hex ends up considering it's an error and I'm getting an annoying warning on every mix command in my CI pipeline:
Invalid Hex config, falling back to default. Source: environment variable CI= "woodpecker".
I would like to open a PR but I wanted to discuss for an idiomatic way to solve this.
We can simply assume a truthy value for this ENV in particular (maybe using something like to_truthy_boolean) ?
The text was updated successfully, but these errors were encountered:
That does sound annoying.
It is also an interesting behavior by woodpecker to not allow their predefined env vars to be modified.
Admittedly, this could just as easily my classified as a design error in their product as a deficiency in the Hex API.
If we were to make a change, my suggestion would be to write a special function like this to deal with the CI value (and treat it as you said, truthy or non-truthy. But, keeping that logic hidden inside of a private function.)
If you put up a PR, I am compelled to approve it. @ericmj@wojtekmach any objections?
Are you able to overwrite that value eg CI=true mix deps.get or set
environment:
CI: true
Or something along those lines?
But if not, your patch is fine by me, I think it’d be nice on principle to continue being stricter but in this particular case I can’t see how it could be harmful.
Hello,
I'm not sure if the description is good enough, but I'm using a CI tool (Woodpecker CI) that injects the
CI
ENV variable with a string value.It seems that when hex is checking its configuration it also checks this ENV.
In the following commit: 5eb05bd , its value is checked against a boolean:
In my case because I don't have control on this ENV variable, Hex ends up considering it's an error and I'm getting an annoying warning on every
mix
command in my CI pipeline:Invalid Hex config, falling back to default. Source: environment variable CI= "woodpecker"
.I would like to open a PR but I wanted to discuss for an idiomatic way to solve this.
We can simply assume a truthy value for this ENV in particular (maybe using something like
to_truthy_boolean
) ?The text was updated successfully, but these errors were encountered: