rtfpessoa / diff2html

Pretty diff to html javascript library (diff2html)
https://diff2html.xyz
MIT License
2.8k stars 273 forks source link

Can't run diff2html-cli on linux docker container #479

Closed wbo-yak closed 1 year ago

wbo-yak commented 1 year ago

Step 0: Describe your environment

Step 1: Describe the problem:

Nothing seems to be generated from diff2html-cli command.

I have generated a git diff and executed the diff2html-cli command but nos logs and no html output

Steps to reproduce:

  1. run a docker container

    docker run debian:latest    Or alpine:latest Or ubuntu:latest
  2. install nodejs/npm and diff2html-cli

    apt install -y npm 
    npm install -g diff2html-cli
  3. Generate a diff from two git repos or two directories

  4. execute diff2html -i file -F pretty-diff.html -- my-diff.diff

diff example:

diff --git describe.c
index fabadb8,cc95eb0..4866510
--- a/describe.c
+++ b/describe.c
@@@ -98,20 -98,12 +98,20 @@@
   return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1;
 }

Observed Results:

Expected Results:

What am i missing ?

wbo-yak commented 1 year ago

Not an issue actually, a misunderstanding in parameters caused confusion. The previous code works correctly on all platforms

rtfpessoa commented 1 year ago

Then I guess we can close this, right?