Matthieu Moy <[EMAIL PROTECTED]> writes:

> +    (shell-command (concat executable " ls-files -d -o -z | xargs -0 "
> +                           executable " update-index --add --remove"))))
> +
>
> First thing: this reduces DVC's portability. AFAIK, only GNU xargs has
> "-0", and I'd rather avoid relying on pipe (I never tried DVC on
> windows, but I suspect this pipe can be problematic).

DVC already requires 'sh' on Windows, for splitting stdout from
stderror in dvc-run-dvc-{a}sync.

MinGW and Cygwin (easy ways to get 'sh' on Windows) both also support
'|'.

But we should have some list of "required external tools", and try not
to extend it. I've started a list in docs/DVC-API.

However, here you use 'shell-command', which depends on the Emacs shell
mechanism using a shell that understands '|'. That _is_ a bad idea on
Windows; the user may have shell set to a DOS shell.

So you should use an explicit 'sh' for this. See dvc-run-dvc-sync for
an example.

--
-- Stephe

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to