Skip to content
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

Add Conda environment support to get_search_paths_from_envs #9

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/resolve_robotics_uri_py/resolve_robotics_uri_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ def get_search_paths_from_envs(env_list):
pathlib.Path(f) if (env != "AMENT_PREFIX_PATH") else pathlib.Path(f) / "share"
for env in env_list if os.getenv(env) is not None
for f in os.getenv(env).split(os.pathsep)
]

] or (
[pathlib.Path(os.getenv("CONDA_PREFIX")) / "share"]
if os.getenv("CONDA_PREFIX")
else []
)

def pathlist_list_to_string(path_list):
return ' '.join(str(path) for path in path_list)

Expand Down