env-cmd icon indicating copy to clipboard operation
env-cmd copied to clipboard

Better errors if the JSON file is invalid

Open flyon opened this issue 2 years ago • 0 comments

When .env-cmdrc.json for example contains an invalid trailing comma then env-cmd gives the following error:

 Failed to find .rc file at default paths: [./.env-cmdrc,./.env-cmdrc.js,./.env-cmdrc.json]

After lots of trial and error I realised it's because of a trailing comma, but env-cmd can perhaps give a more detailed error when it failed to parse a .rc file, instead of saying it cannot find any.

flyon avatar Jul 03 '23 07:07 flyon