Skip to content

Commit

Permalink
Fix git promts + add an image (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
niosus authored Feb 23, 2018
1 parent a11df38 commit 9c6be29
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# "fetch" and "update" your dependencies with catkin_tools

![Cool GIF](fetch_show_off.gif)

[![PyPI][pypi-img]][pypi-link]
[![Build Status][travis-img]][travis-link]
[![Codacy Badge][codacy-img]][codacy-link]
Expand Down
8 changes: 7 additions & 1 deletion catkin_tools_fetch/lib/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,17 @@ def repository_exists(dependency):
Returns:
bool: True if exists, False otherwise
"""
from os import environ
urls = []
if dependency.url:
urls.append(dependency.url)
else:
urls.extend(dependency.default_urls)
log.debug(" Checking urls: %s", urls)
# Disable git interactive promts. Just fail silently.
new_env = environ
new_env["GIT_TERMINAL_PROMPT"] = "0"
# Check all urls.
for url in urls:
git_cmd = GitBridge.CHECK_CMD_MASK.format(url=url)
try:
Expand All @@ -96,7 +101,8 @@ def repository_exists(dependency):
subprocess.check_call(git_cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True)
shell=True,
env=new_env)
# Update the working url if needed.
dependency.url = url
return dependency, True
Expand Down
Binary file added fetch_show_off.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from setuptools import find_packages
from setuptools.command.install import install

version_str = '0.3.0'
version_str = '0.3.2'

# Setup installation dependencies
install_requires = [
Expand Down

0 comments on commit 9c6be29

Please sign in to comment.