# Buggy code
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        "update",
        formatter_class=RawDescriptionHelpFormatter,
        description=description,
        help=description,
        epilog=example,
    )
    p.add_argument(
        "-n",
        "--name",
        action="store",
        help="name of environment (in %s)" % os.pathsep.join(config.envs_dirs),
        default=None,
    )
    p.add_argument(
        "-f",
        "--file",
        action="store",
        help="environment definition (default: environment.yml)",
        default="environment.yml",
    )
    p.add_argument(
        "--prune",
        action="store_true",
        default=False,
        help="remove installed packages not defined in environment.yml",
    )
    p.add_argument(
        "-q",
        "--quiet",
        action="store_true",
        default=False,
    )
    p.add_argument(
        "remote_definition",
        help="remote environment definition / IPython notebook",
        action="store",
        default=None,
        nargs="?",
    )
    common.add_parser_json(p)
    p.set_defaults(func=execute)


# Traceback (AttributeError)
conda env update
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : linux-64
conda version : 4.3.20
conda is private : False
conda-env version : 4.3.20
conda-build version : not installed
python version : 3.5.2.final.0
requests version : 2.14.2
root environment : /home/travis/miniconda  (writable)
default environment : /home/travis/miniconda
envs directories : /home/travis/miniconda/envs
/home/travis/.conda/envs
package cache : /home/travis/miniconda/pkgs
/home/travis/.conda/pkgs
channel URLs : https://conda.anaconda.org/conda-canary/linux-64
https://conda.anaconda.org/conda-canary/noarch
https://repo.continuum.io/pkgs/free/linux-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/linux-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/linux-64
https://repo.continuum.io/pkgs/pro/noarch
config file : /home/travis/.condarc
netrc file : None
offline mode : False
user-agent : conda/4.3.20 requests/2.14.2 CPython/3.5.2 Linux/4.4.0-51-generic debian/jessie/sid glibc/2.19
UID:GID : 1000:1000
`$ /home/travis/miniconda/bin/conda-env update`
Traceback (most recent call last):
File "/home/travis/miniconda/lib/python3.5/site-packages/conda/exceptions.py", line 632, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/home/travis/miniconda/lib/python3.5/site-packages/conda_env/cli/main_update.py", line 82, in execute
if not (args.name or args.prefix):
AttributeError: 'Namespace' object has no attribute 'prefix'

# Fixed code
def configure_parser(sub_parsers):
    p = sub_parsers.add_parser(
        "update",
        formatter_class=RawDescriptionHelpFormatter,
        description=description,
        help=description,
        epilog=example,
    )
    common.add_parser_prefix(p)
    p.add_argument(
        "-f",
        "--file",
        action="store",
        help="environment definition (default: environment.yml)",
        default="environment.yml",
    )
    p.add_argument(
        "--prune",
        action="store_true",
        default=False,
        help="remove installed packages not defined in environment.yml",
    )
    p.add_argument(
        "-q",
        "--quiet",
        action="store_true",
        default=False,
    )
    p.add_argument(
        "remote_definition",
        help="remote environment definition / IPython notebook",
        action="store",
        default=None,
        nargs="?",
    )
    common.add_parser_json(p)
    p.set_defaults(func=execute)