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

Fix location of rosdep cache dir #109

Merged
merged 1 commit into from
Jan 8, 2023
Merged
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
6 changes: 4 additions & 2 deletions src/catkin_lint/ros.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ def has_key(self, name):
def get_rosdep(quiet):
from rosdep2.lookup import RosdepLookup
from rosdep2.rospkg_loader import DEFAULT_VIEW_KEY
from rosdep2.sources_list import SourcesListLoader
from rosdep2.sources_list import SourcesListLoader, SOURCES_CACHE_DIR
dummy = DummyRospkg()
sources_loader = SourcesListLoader.create_default(sources_cache_dir=os.environ.get("ROSDEP_CACHE_PATH", None))
rosdep_cache_dir = os.environ.get("ROSDEP_CACHE_PATH", None)
sources_cache_dir = os.path.join(rosdep_cache_dir, SOURCES_CACHE_DIR) if rosdep_cache_dir is not None else None
sources_loader = SourcesListLoader.create_default(sources_cache_dir=sources_cache_dir)
lookup = RosdepLookup.create_from_rospkg(rospack=dummy, rosstack=dummy, sources_loader=sources_loader)
return Rosdep(view=lookup.get_rosdep_view(DEFAULT_VIEW_KEY), quiet=quiet)

Expand Down