Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User environment variable "EMBEDDED_MONGO_ARTIFACTS" ignored on Windows #461

Open
blafoo opened this issue May 12, 2023 · 4 comments
Open

Comments

@blafoo
Copy link

blafoo commented May 12, 2023

Assume a Windows system with restricted permissions to the developer... The developer can only set "user environment variables" but not "system environmenent variables".
In this case EMBEDDED_MONGO_ARTIFACTS is 'null' in de.flapdoodle.embed.mongo.transitions.ExtractFileSet.persistentBaseDir() and user.home is used instead.

The same behaviour applies to the vmarg -DEMBEDDED_MONGO_ARTIFACTS=... in the Eclipse test configuration or in the eclipse.ini whereas -Dde.flapdoodle.embed.io.tmpdir=... properly works.

@michaelmosmann
Copy link
Member

@blafoo hm.. AFAIK there is no special call to get user env variables on windows.. so System.getenv() should provide system and user env variables. But maybe your user env variable is not visible to the current session, maybe logoout/login could help.

btw: i am not sure if vmarg is the way to go .. i could add a property for that.

@blafoo
Copy link
Author

blafoo commented May 12, 2023

@michaelmosmann May be the cause is that a new process is started which runs in a different user context?! A property like de.flapdoodle.embed.io.artdir should solve the problem and beyond it would unify the way how to configure the application.

@michaelmosmann
Copy link
Member

@blafoo maybe it is very useful to support both:)

@blafoo
Copy link
Author

blafoo commented May 17, 2023

@michaelmosmann That's a good idea. Existings users wouldn't have to change anything and "new" users are supported in an additional way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants