I have a Grunt task called eslint:jenkins that runs eslint on the project. In the build pipeline I run it as:
grunt eslint:jenkins --force --verbose
I use --force so the grunt will not fail even if the task fails because there are some eslint issues.
When I run this locally everything is fine. When this runs on Jenkins I get the following error:
<path-to-installation>/Node_10/bin/node: bad option: --force
For both local and Jenkins environments the versions are: Node 10.0 and grunt-cli 1.3.1.
I cannot imagine any reason why in one case the --force flag is propagated to Node. Can anybody give me some pointers on where to look at?