Fix regression of default behaviour in Command.project_name
Needed an `os.abspath` in there. Added more tests, too. Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
7fb43cc85f
commit
91fe414522
2 changed files with 18 additions and 2 deletions
|
|
@ -69,7 +69,7 @@ class Command(DocoptCommand):
|
|||
|
||||
@cached_property
|
||||
def project_name(self):
|
||||
project = os.path.basename(os.path.dirname(self.yaml_path))
|
||||
project = os.path.basename(os.path.dirname(os.path.abspath(self.yaml_path)))
|
||||
if self.explicit_project_name is not None:
|
||||
project = self.explicit_project_name
|
||||
project = re.sub(r'[^a-zA-Z0-9]', '', project)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue