augustocdias / vscode-shell-command

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

defaultOptions aren't honored #107

Closed obambrough closed 2 weeks ago

obambrough commented 2 weeks ago

Actual behavior:

The command doesn't return anything and an exception is thrown "The command for input 'selectRepository' returned empty result."

Expected behavior:

The list of values from the input's defaultOptions will be listed to choose from.

Looking at the code I see on line 240 of CommandHandler.ts the quickPick method will apply the defaultOptions if the input array has a length of 0 but I don't think that's ever triggered as the parseResult method on line 209 of CommandHandler.ts will throw an exception if there aren't any results.

MarcelRobitaille commented 2 weeks ago

This was likely broken in #96.

MarcelRobitaille commented 2 weeks ago

Thanks for the report. Fixed in 1.12.1. It's on my todo list to add tests to this stuff.