Skip to content

Commit

Permalink
[utils] Fix share dir when running from repo clone
Browse files Browse the repository at this point in the history
Change:
- ansible#562 broke people who run navigator from a clone of the repository
  without installing it somewhere. The search path for the share
  directory starts with looking for it relative to utils.py for exactly
  this scenario. However when the ansible_navigator directory got moved
  a level deeper, this path wasn't updated.

Test Plan:
- Ran ansible-navigator from git clone after pip uninstalling it.

Signed-off-by: Rick Elrod <rick@elrod.me>
  • Loading branch information
relrod committed Sep 17, 2021
1 parent a58e696 commit 2a271e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/ansible_navigator/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def debug_log(directory: str, found: bool, description: str):
# We want the share directory to resolve adjacent to the directory the code lives in
# as that's the layout in the source.
share_directory = os.path.abspath(
os.path.join(os.path.dirname(__file__), "..", "share", app_name)
os.path.join(os.path.dirname(__file__), "..", "..", "share", app_name)
)
description = "development path"
if os.path.exists(share_directory):
Expand Down

0 comments on commit 2a271e8

Please sign in to comment.