-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand user home on galaxy install src #70942
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bugfixes: | ||
- galaxy - expand ``~`` (user home) from role src (https://github.com/ansible/ansible/pull/70942/). |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ | |
from ansible.module_utils.urls import open_url | ||
from ansible.playbook.role.requirement import RoleRequirement | ||
from ansible.utils.display import Display | ||
from ansible.utils.path import unfrackpath | ||
|
||
display = Display() | ||
|
||
|
@@ -64,7 +65,7 @@ def __init__(self, galaxy, api, name, src=None, version=None, scm=None, path=Non | |
|
||
self.name = name | ||
self.version = version | ||
self.src = src or name | ||
self.src = unfrackpath(src or name) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could be using unfrackpath on a URL, git repo, or something that provides an absolute path prefixed with file://. This would break those scenarios since we automatically prepend a base dir in unfrackpath.
We might be able to move this somewhere that's only supposed to handle directories, or your original This definitely needs tests. |
||
self.scm = scm | ||
self.paths = [os.path.join(x, self.name) for x in galaxy.roles_paths] | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wording might be confusing since we have particular syntax for repos. The example above was recently changed 7762741.
# from local path
is maybe clearer