augustocdias / vscode-shell-command

A task helper to use system commands as input
MIT License
51 stars 19 forks source link

parse boolean type user inputs in case they're passed in as strings #97

Closed dhlin closed 1 month ago

dhlin commented 1 month ago

While working on https://github.com/augustocdias/vscode-shell-command/pull/96 , I found there is a general issue regarding how a user provided boolean arg is used. The current code assumes those variable are boolean (or undefined), but in fact user can provide them as a string in which the variable is always treated as "true" (e.g "useFirstResult": "false") This seems confusing and error prone, so add this parsing before we use them.