How to access diffutils?

I have a test that compares the output of the application with stored templates.

But when running the CI scripts, my test script claims there is no “diff” executable.

At first I thought, diffutils may not be installed, so I tried sudo apt-get install diffutils:

Run sudo apt-get install diffutils
 sudo apt-get install diffutils
  shell: /bin/bash -e {0}
Reading package lists...
Building dependency tree...
Reading state information...
diffutils is already the newest version (1:3.6-1).
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.

So, it’s installed. Still, which diff returns an empty string, and trying to execute diff says diff: command not found.

So, I thought, maybe it’s not in the path, so I printed the environment.


/usr/bin is there, of course, and that’s where I’d expect the diff binary.

Still, no dice.

Any idea what I am doing wrong?

Ok, I solved it. Instead of using diff directly, I just use git diff --no-index to do the comparison.

1 Like