zacharyvoase / markdoc

A lightweight Markdown-based wiki system. Current status: abandoned.
http://markdoc.org/
The Unlicense
347 stars 74 forks source link

Handling of missing rsync executable #38

Open timstoop opened 7 years ago

timstoop commented 7 years ago

When rsync is missing on the system, markdoc build exits with a fairly cryptic stacktrace:

Traceback (most recent call last):
  File "/usr/bin/markdoc", line 9, in <module>
    load_entry_point('Markdoc==0.6.6', 'console_scripts', 'markdoc')()
  File "/usr/lib/python2.7/site-packages/markdoc/cli/main.py", line 38, in main
    return command(config, args)
  File "/usr/lib/python2.7/site-packages/markdoc/cli/commands.py", line 29, in wrapper
    return function(config, args)
  File "/usr/lib/python2.7/site-packages/markdoc/cli/commands.py", line 271, in build
    sync_html(config, args)
  File "/usr/lib/python2.7/site-packages/markdoc/cli/commands.py", line 29, in wrapper
    return function(config, args)
  File "/usr/lib/python2.7/site-packages/markdoc/cli/commands.py", line 239, in sync_html
    subprocess.check_call(command)
  File "/usr/lib/python2.7/subprocess.py", line 536, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I think it would help a lot of people if markdoc would check on the availability of rsync first and error if it's not available.