1

Closed

Error when executing ajaxmin -v

description

Please take a look at the attached file, it is a screenshot of the command ajaxmin -v
 
before this update, this command was running fine (no errors)
 
Fabio

file attachments

Closed Oct 9, 2012 at 10:33 PM by ronlo
cleaning up the issues list

comments

ronlo wrote Jul 5, 2011 at 4:12 PM

I see the error. I'll definitely get rid of the exception. Question for you, though, and it's kinda embarassing: can you refresh my memory on what the -v option used to do? I see in the code that it is now a legacy switch that doesn't actually do anything, but I can't remember what it used to do.

The reason the exception is happening when running "ajaxmin -v" is because of a bad if-statement in my code that ends up trying to set the encoding fallback to null because I can't tell if you want to try minifying JS or CSS. I'll fix that so it doesn't happen. In the meantime, if you specify which you want (-css or -js) on the command-line, the exception shouldn't happen in the first place.

ronlo wrote Jul 5, 2011 at 4:34 PM

fixed in release 4.24. Still errors, because it doesn't know whether you want to minify CSS or JS, but it doesn't throw an exception anymore.

fabiocanada wrote Jul 5, 2011 at 4:41 PM

-v did nothing, except printing "error AM-USAGE: Unknown input type....." and showing all the commands as in if I had typed -?
The reason why I used -v was actually because I thought that it would show me the ajaxmin version number. Here's actually a suggestion for you :)

Thanks!

ronlo wrote Jul 5, 2011 at 4:45 PM

That's actually a really good point: the Usage text just keeps getting longer and longer and is hiding the header and maing it harder to see the actual error string. Maybe in the next release I'll change it so errors will only display a "type 'ajaxmin.exe -?' for full usage information" line instead of the entire usage scrawl. Thanks!