minor bug: "No scripts available" doesn't occur on an empty file
paperdave opened this issue · comments
dave caruso commented
i accidentally made an empty scripts.yaml and ran vr. there seems to be a thing for no scripts available, but if you have a fully blank yaml file, you get this instead
error: Uncaught (in promise) TypeError: Cannot read property 'scripts' of undefined
!configData.config.scripts ||
^
at validateConfigData (https://deno.land/x/velociraptor@1.0.0-beta.18/src/validate_config_data.ts:10:24)
at runScript (https://deno.land/x/velociraptor@1.0.0-beta.18/src/run_script.ts:16:3)
at VrCommand.fn (https://deno.land/x/velociraptor@1.0.0-beta.18/src/cli/commands/vr.ts:29:15)
at VrCommand.execute (https://deno.land/x/cliffy@v0.18.1/command/command.ts:966:18)
at VrCommand.parse (https://deno.land/x/cliffy@v0.18.1/command/command.ts:894:27)
i think this is cause an empty file parses to undefined so that should be checked.
Umberto Pepato commented
Hey @davecaruso, thanks for reporting this!
This was fixed in 83f1bf9 and will be soon released in 1.0.0
🙂
Umberto Pepato commented
@davecaruso v1.0 is out now, can you please confirm that this works?
$ deno install -qAfn vr https://deno.land/x/velociraptor@1.0.0/cli.ts
dave caruso commented
sorry for late reply. yes, this works now.