[
https://issues.apache.org/jira/browse/ARIA-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16001336#comment-16001336
]
ASF GitHub Bot commented on ARIA-210:
-------------------------------------
Github user ran-z commented on a diff in the pull request:
https://github.com/apache/incubator-ariatosca/pull/128#discussion_r115324450
--- Diff: aria/cli/commands/service_templates.py ---
@@ -195,7 +195,9 @@ def create_archive(service_template_path, destination,
logger):
`destination` is the path of the output CSAR archive file
"""
logger.info('Creating a CSAR archive')
- csar.write(os.path.dirname(service_template_path),
service_template_path, destination, logger)
+ if not destination.endswith('.csar'):
--- End diff --
maybe extract `.csar` suffix to a constant in csar.py? seems like its
defined in several places now
> Relative paths may cause issues in `aria service-templates` commands
> --------------------------------------------------------------------
>
> Key: ARIA-210
> URL: https://issues.apache.org/jira/browse/ARIA-210
> Project: AriaTosca
> Issue Type: Bug
> Reporter: Ran Ziv
> Assignee: Avia Efrat
>
> The CLI commands {{aria service-templates store}} and {{aria
> service-templates create-archive}} use the {{os.path.dirname}} method to get
> the directory of the main service-template file.
> In the former ({{store}} command) this causes errors when the user is already
> in the directory of the main service-template file and passes the file
> directly (e.g. {{aria service-templates store service-template.yaml
> my-service-template}})) - It'll fail when trying to copy the
> service-template's resources like so:
> {{cannot copy tree '': not a directory}}
> In the latter ({{create-archive}}), any relative path usage will result in an
> error claiming the file does not exist.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)