0
votes

I am trying to execute following command from Jenkins window batch command

csslint --format=lint-xml file.css > result.xml 

but every time it fail and give error: "csslint is not recognized as an internal or external command, operable program or batch file."

I have set the Nodejs path correctly and above command executing from command prompt successfully.

Can anybody help me on this?

1

1 Answers

0
votes

First did you install csslint as a global?

npm install csslint -g

Second, I would then assume that csslint is not on your path.

in your batch program add this line above your app and see what your environment looks like.

env
csslint --format=lint-xml file.css > result.xml 

that will print out your environment variables for that given jenkins run so you can take a look at your PATH variable and see if csslint is in any of those folders.