OyvindLGjesdal commented on PR #2410: URL: https://github.com/apache/jena/pull/2410#issuecomment-2061530511
Adding a dependency for dotenv and using both dotenv and crossenv seems to work for the CI-Job, and the variables *should* be used by default from dotenv when working with it directly. I don't understand why I have to use cross-env, if I already have the env set, but it feels like the values aren't available if not listed first in the script section, prior to the job. I am clearly missing something here in how this works. Good news is that the windows job is passing and running tests even when turning on errors again in maven. Bad news is the script is kind of ugly and hackish, and adds an extra dependency (BSD). Will clean up the extra files and unused parts and push to a single commit again hopefully this evening. [Node added a parameter for reading environment vars](https://nodejs.org/en/blog/release/v20.6.0 without using a library in version 20.6), but I don't think it is reachable when using yarn, from web searches. Another alternative that looks better imo, is writing a simple helper script that sets environment vars (with defaults) and adding it at the beginning. See https://stackoverflow.com/questions/32446734/how-to-set-environment-variables-in-a-cross-platform-way That could mean removing a dependency (cross-env) instead of adding a dependency, however I didn't get it to work immediately. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
