0

Attempt was choco install git -y, but it does not seem to be available:

The command "diff -u <(echo -n) <(gofmt -d ./)" exited with 2.
diff: /dev/fd/62: No such file or directory

Windows Travis Build

2

When git is installed it usually doesn't add the diff executable to the path because it would conflict with other versions of diff native to Windows, for example, the Compare-Object alias in PowerShell.

  1. You can usually get around this by adding C:\Program Files\Git\usr\ to the path which contains all of the UNIX ports of functionality such diff, grep, awk, sed. You do have to be careful as some commands are used more commonly on Windows than others, the most common one is find.

  2. A second option would be to fully qualify the call to diff by appending C:\Program Files\Git\usr\bin.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.