Open LiaungYip opened 9 years ago
Aha! I was wondering why this was happening. Enlightening.
I know this is pretty old, but I forked this project and rewrote the sync stuff in pure Python; as it turns out there's a bug in make_relative
at render.py:35
that causes relative resolution to fail on Windows for source files due to differing path separators. So even with rsync
, building wouldn't have worked properly.
On Windows, running Markdoc without
rsync
installed causes the following confusing error message to be displayed:If we run with the
--verbose
option we can see this is just after the Markdoc attempts to callrsync
which is not installed.Markdoc should trap this exception and produce a more useful error message, such as
OSError: rsync not installed or could not be found.
Actually it's even worse than this; I do have
rsync
installed (viacwRsync
) but Python can't find it. This is a Windows specific bug. The problem is atcommands.py:238
wheresubprocess.check_call()
is called with the default argument ofshell=False
. To quote from Walter Mundt's StackOverflow answer - "Also, on Windows with shell=False, it pays no attention to PATH at all, and will only look in relative to the current working directory". So even thoughrsync
is on my path, Python on Windows can't find it.