Skip to content

Commit

Permalink
Create the .condarc file if it doesn't exist yet in conda config
Browse files Browse the repository at this point in the history
  • Loading branch information
asmeurer committed Jul 16, 2013
1 parent dbf4976 commit b662fc1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion conda/cli/main_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ def execute(args, parser):
else:
rc_path = config.user_rc_path

with open(rc_path, 'r') as rc:
# Create the file if it doesn't exist
with open(rc_path, 'r+') as rc:
rc_text = rc.read()
rc_config = yaml.load(rc_text)
if rc_config is None:
rc_config = {}

# Get
for key, in args.get:
Expand Down

0 comments on commit b662fc1

Please sign in to comment.