Skip to content

Commit f78f58c

Browse files
author
Oliver Nordbjerg
committed
fix(client): default value for path using docopt
Set the default value for the path option on the command config:push to .env
1 parent acc96c6 commit f78f58c

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

client/deis.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,24 +1327,19 @@ def config_push(self, args):
13271327
13281328
Usage: deis config:push [<path>] [options]
13291329
1330-
Arguments:
1331-
<path>
1332-
a path leading to an environment file
1333-
13341330
Options:
13351331
-a --app=<app>
13361332
the uniquely identifiable name for the application.
1333+
-p <path>, --path=<path>
1334+
a path leading to an environment file [default: .env]
13371335
"""
1338-
env_file = '.env'
1339-
if args.get('<path>'):
1340-
env_file = args.get('<path>')
13411336
app = args.get('--app')
13421337
if not app:
13431338
app = self._session.app
13441339

13451340
# read from .env
13461341
try:
1347-
with open(env_file, 'r') as f:
1342+
with open(args.get('--path'), 'r') as f:
13481343
self._config_set(app, dictify([line.strip() for line in f]))
13491344
except IOError:
13501345
self._logger.error('could not read env from ' + env_file)

0 commit comments

Comments
 (0)