0

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?

Sumit Gupta
  • 775
  • 7
  • 9

1 Answers1

0

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.

jhnlsn
  • 186
  • 4
  • csslint is installed and path is also set in enviornment variable. But adding evn in also not working. it giving the same error 'env' is not recognized as an internal or external command, operable program or batch file. – Sumit Gupta Oct 09 '13 at 09:26
  • I think I forgot to ask you, is this version of jenkins installed on a windows machine? – jhnlsn Oct 09 '13 at 19:52
  • Yes I am using Jenkins on windows. – Sumit Gupta Oct 11 '13 at 13:05
  • ah well yea, env is not a windows command. essentially you just need to print out your environment variables to the console so that jenkins can display it for you. – jhnlsn Oct 18 '13 at 18:32