Coder Social home page Coder Social logo

Comments (10)

ashald avatar ashald commented on July 22, 2024 5

Actually, I was able to figure out a hack to make it work. See https://github.com/ashald/EnvFile#experimental-integrations for details.

I just released v3.2.0 and it may take up to 2 days for JetBrains to process the release, in meantime you can download release directly and install it manually from https://github.com/ashald/EnvFile/releases/tag/v3.2.0

Kudos to @mertvetsky for reproduction steps!

May242019123614

from envfile.

ashald avatar ashald commented on July 22, 2024 1

Cannot say for sure yet but it seems that it might be possible - take some time to figure out available integration points...

from envfile.

LutzStrobel avatar LutzStrobel commented on July 22, 2024

I use Idea 2017.3.3 and env version 2.1.0.
The env-file tab is available but does not have any effect.
The variables used are asfollows:
EXT_DATABASE_PASSWORD=cde
EXT_DATABASE_PORT=5432
EXT_DATABASE_SCHEMA=cde
EXT_DATABASE_USER=cde
...

Whats up with my doing?

from envfile.

ashald avatar ashald commented on July 22, 2024

I just tried it with 2017.3.4 and it worked fine. Did you verify that both the plugin and the file are enabled?
enabled

Also, I wonder if it might be related to the content of your file and parser used. My test file looked exactly this way:

EXT_DATABASE_PASSWORD=cde
EXT_DATABASE_PORT=5432
EXT_DATABASE_SCHEMA=cde
EXT_DATABASE_USER=cde

from envfile.

ashald avatar ashald commented on July 22, 2024

Ah, wait, I used an Application run configuration.

Can you please provide me with a minimal Gradle project I can use to run some simple app that prints its environment?

from envfile.

LutzStrobel avatar LutzStrobel commented on July 22, 2024

I will try it to morrow in the morning.

from envfile.

mertvetsky avatar mertvetsky commented on July 22, 2024

I met same problem: running by gradle tasks do not uses file for env import on IDEA community 2018.2

How check it:

  1. Create new gradle project with java
  2. Edit build.gradle like this (just add application plugin and mainClassName):
plugins {
    id 'java'
    id 'application'
}

group 'mert'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
}

mainClassName="App"
  1. Create file ./src/main/java/App.java:
public class App {
    public static void main(String[] args) {
        System.out.print(System.getenv().getOrDefault("FOO", "EMPTY"));
    }
}
  1. Run application/run task from gradle sidebar
  2. Then edit created Run/Debug config for import file with parameter FOO=BAR

PS
When this project runs by "play button" opposite main method it works fine.

from envfile.

yelhouti avatar yelhouti commented on July 22, 2024

Same issue here, any ETA on this please?

from envfile.

ashald avatar ashald commented on July 22, 2024

@yelhouti contributions are welcome!

from envfile.

yelhouti avatar yelhouti commented on July 22, 2024

great thank you very much :)

from envfile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.