Example #1
0
def load_env(entrypoint, app=None):
    try:
        heroku = HerokuCommand(
            app=app,
            cwd=os.path.dirname(entrypoint),
        )
        heroku_config = heroku.config_get()
    except HerokuCommandError:
        pass
    else:
        for key, value in heroku_config.items():
            os.environ.setdefault(key, value)
Example #2
0
def load_env(entrypoint, app=None):
    try:
        heroku = HerokuCommand(
            app = app,
            cwd = os.path.dirname(entrypoint),
        )
        heroku_config = heroku.config_get()
    except HerokuCommandError:
        pass
    else:
        for key, value in heroku_config.items():
            os.environ.setdefault(key, value)
Example #3
0
 def heroku(self):
     return HerokuCommand(
         app=self.app,
         cwd=settings.BASE_DIR,
         stdout=self.stdout._out,
         stderr=self.stderr._out,
         dry_run=self.dry_run,
     )
Example #4
0
 def heroku(self):
     return HerokuCommand(
         app=self.app,
         cwd=self.dir,
     )