Merge pull request #79 from orchardup/strict-config

Throw an error if you specify an unrecognised option in `fig.yml`
This commit is contained in:
Ben Firshman 2014-02-04 18:10:42 -08:00
commit d52f73b29a
3 changed files with 46 additions and 17 deletions

View file

@ -7,8 +7,10 @@ import logging
import os
import re
import yaml
import six
from ..project import Project
from ..service import ConfigError
from .docopt_command import DocoptCommand
from .formatter import Formatter
from .utils import cached_property, docker_url, call_silently, is_mac, is_ubuntu
@ -69,7 +71,10 @@ If it's at a non-standard location, specify the URL with the DOCKER_HOST environ
exit(1)
return Project.from_config(self.project_name, config, self.client)
try:
return Project.from_config(self.project_name, config, self.client)
except ConfigError as e:
raise UserError(six.text_type(e))
@cached_property
def project_name(self):