-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Unable to copy .env file in dev mode #8297
Comments
This is weird since the feature is being tested in Windows as well. We would need someone with a Windows machine to take a look and find the root cause of this. |
Thanks a lot @jaikiran!!! |
@Legion2, the linked PR has been merged to upstream master branch. Would it be possible for you to build the latest Quarkus master branch and then use the |
I didn't get the exception printed in english, but here is the corresponding translation: "A required privilege is not held by the client".
But I can create the symlink by hand from the same terminal I started quarkus dev:
|
I have the same issue, is there any known workarounds? |
Not unless we can figure out what exactly is causing the symlink creation failure on Windows (it works on Windows CI) |
Does the windows CI use administrator rights? |
I have the same warning on my Windows10 machine if I call
@geoand Can you please retest without admin rights? |
Per default my windows user has not the permission to create symbolic links.
But I don't think this is a good way to go. Preventing the usage of symbolic links would be better! |
@haraldatbmw You could also just enable Windows Developer Mode https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/ |
@Legion2 Windows Developer Mode did not work for me. |
Please don't use symbolic links. They usually require elevated privileges on Windows 10 and therefore just cause pain. |
What is the proper Windows alternative? |
There isn't any really. You will have to copy the file. But I guess a symbolic link would be preferable as the .env file is likely to contain credentials and they shouldn't be copied unnecessarily. |
The reason why we add a symbolic is to be able to track changes to and hot deploy Quarkus when that happens. |
Created a new ticket for a similar issue - #9752. |
One more issue found. The property definition in Say for example
Run command |
Please open a new issue for that find. |
I just checked that on my private machine with Windows 10 Home (please don't ask why it is not a Pro) and with Home you don't even have But I was able to create a link via:
This will create a hard link, though. But AFAICS this would be a sufficient workaround.
Btw, because of this issue PS: Without any elevated rights you can also create a "directory junction" with |
That is excellent information @famod , thanks a lot! Would you like to submit a PR proposing such a fix? |
I can try, yes. It is rather unlikely that this would end up in 1.6.x, isn't it? |
If it's just a small bug fix, then we can probably backport it. If it's more involved, then it would probably end up in 1.7 |
#10316 should fix this. Btw, turns out |
Describe the bug
The
.env
file for environment variables at project root can't be used on Windows 10.When creating this file and running
mvnw quarkus:dev
it produces a warning in the log and the environment variables are not used by quarkus.Expected behavior
I can define environment variables in
.env
file and use it inapplication.properties
like this:greeting.message = ${MESSAGE}
Actual behavior
A warning and exception is printed to the console:
To Reproduce
Steps to reproduce the behavior:
git clone https://github.com/quarkusio/quarkus-quickstarts.git
(tag:1.3.1.Final
)config-quickstart
directory.env
file in theconfig-quickstart
directory, see below for the contentapplication.properties
like belowmvnw quarkus:dev
Configuration
application.properties
:.env
:Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a
orver
: Microsoft Windows [Version 10.0.18363.720]java -version
:mvnw --version
orgradlew --version
):Additional context
Feature was added in #7519
The text was updated successfully, but these errors were encountered: