Throw an error if you specify an unrecognised option in fig.yml

Closes #27.
This commit is contained in:
Aanand Prasad 2014-02-04 16:33:29 -08:00
commit edf8f14ac0
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
@ -47,7 +49,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):