From abdffd583d9696c8740bbcec689aedb77750016b Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Sat, 22 Nov 2014 15:03:00 +0000 Subject: Treat path given to deploy cmd as relative to cwd --- morphlib/plugins/deploy_plugin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py index 87fd259f..6d506a21 100644 --- a/morphlib/plugins/deploy_plugin.py +++ b/morphlib/plugins/deploy_plugin.py @@ -335,11 +335,12 @@ class DeployPlugin(cliapp.Plugin): self.app.settings['tempdir-min-space'], '/', 0) - cluster_filename = morphlib.util.sanitise_morphology_path(args[0]) - ws = morphlib.workspace.open('.') sb = morphlib.sysbranchdir.open_from_within('.') + cluster_filename = morphlib.util.sanitise_morphology_path(args[0]) + cluster_filename = sb.relative_to_root_repo(cluster_filename) + build_uuid = uuid.uuid4().hex build_command = morphlib.buildcommand.BuildCommand(self.app) @@ -351,6 +352,7 @@ class DeployPlugin(cliapp.Plugin): build_ref_prefix = self.app.settings['build-ref-prefix'] root_repo_dir = morphlib.gitdir.GitDirectory( sb.get_git_directory_name(sb.root_repository_url)) + cluster_text = root_repo_dir.read_file(cluster_filename) cluster_morphology = loader.load_from_string(cluster_text, filename=cluster_filename) -- cgit v1.2.1