Skip to content

Commit

Permalink
Merge pull request #31 from INN/11-verify-prereqs-errors
Browse files Browse the repository at this point in the history
Tweaks to verify_prerequisites to avoid false positive
  • Loading branch information
benlk committed Aug 10, 2017
2 parents c529ea7 + ad6ef29 commit 3140bd0
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions fablib/wp/__init__.py
Expand Up @@ -36,31 +36,33 @@ def verify_prerequisites():
ret = capture('curl -V | grep sftp')
if ret.return_code == 1:
if sys.platform.startswith('darwin'):
print(colors.yellow(
'Your version of curl does not support sftp. ' +
'Attempting installation of curl with sftp support via brew...'))
capture('brew update')
capture('brew install curl --with-ssh')
capture('brew link --force curl')
print(colors.red(
"Your version of curl does not support sftp...\n" +
"You can attempt installing curl+sftp by running:\n"))
print(colors.cyan(
" brew update\n" +
" brew install curl --with-ssh\n" +
" brew link --force curl"))
else:
print(colors.red(
'Your version of curl does not support sftp. ' +
'You may have to recompile it with sftp support. ' +
'See the deploy-tools README for more information.'
"Your version of curl does not support sftp.\n" +
"You may have to recompile it with sftp support.\n" +
"See the deploy-tools README for more information."
))
sys.exit(1)
else:
print(colors.green('Your installation of curl supports sftp!'))

print(colors.cyan('Ensuring you have git-ftp installed...'))
ret = capture('git ftp --version')
if ret.return_code == 1:
print(colors.red(
'You do not have git-ftp installed!'))
'You do not have git-ftp installed!'
))
print(colors.yellow(
"""
Install git-ftp version 0.9.0 using the instructions found here:
https://github.com/git-ftp/git-ftp/blob/develop/INSTALL.md
"""))
"Install git-ftp version 0.9.0 using the instructions found here:\n" +
"https://github.com/git-ftp/git-ftp/blob/develop/INSTALL.md"
))
sys.exit(1)
else:
print(colors.green('You have git-ftp installed!'))
Expand Down

0 comments on commit 3140bd0

Please sign in to comment.