Skip to content

Commit

Permalink
Some work on conda config
Browse files Browse the repository at this point in the history
  • Loading branch information
asmeurer committed Jul 16, 2013
1 parent 47f6dd4 commit e98cc08
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion conda/cli/main_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
import re
from argparse import RawDescriptionHelpFormatter

import common
import conda.config as config
Expand All @@ -15,12 +16,14 @@

example = """
examples:
conda config -add channels foo
conda config --get channels --system
conda config --add channels foo
"""

def configure_parser(sub_parsers):
p = sub_parsers.add_parser(
'config',
formatter_class = RawDescriptionHelpFormatter,
description = descr,
help = descr,
epilog = example,
Expand Down Expand Up @@ -57,6 +60,13 @@ def configure_parser(sub_parsers):
)
p.set_defaults(func=execute)

p.add_argument(
"-f", "--force",
action = "store_true",
help = """Write to the config file using the yaml parser. This will
remove any comments or structure from the file."""
)

def execute(args, parser):
try:
import yaml
Expand Down

0 comments on commit e98cc08

Please sign in to comment.