DNXLabs / one-cli

CLI to manage all stacks from DNX.
https://cli.dnx.one
Apache License 2.0
7 stars 0 forks source link

Mouse actions on prompt generates error on one-cli execution #78

Open Renatovnctavares opened 4 years ago

Renatovnctavares commented 4 years ago

Found a bug? Please fill out the sections below. šŸ‘

Issue Summary

A summary of the issue.

Steps to Reproduce the Problem

  1. type one workspace change
  2. when the prompt comes up with a list, hit any part of the prompt with mouse cursor. error: Traceback (most recent call last): File "/usr/local/bin/one", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/one/main.py", line 5, in main cli() File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in call return self.main(args, kwargs) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(args, **kwargs) File "/usr/local/lib/python3.8/site-packages/one/commands/workspace.py", line 38, in change f.write('WORKSPACE=' + answers['workspace'] + '\n') KeyError: 'workspace'

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?

Specifications

lzrocha commented 4 years ago

same here

arthurbdiniz commented 4 years ago

Hi @Renatovnctavares and @lzrocha, can you share the one.yaml file?

arthurbdiniz commented 4 years ago

Found that this is an error in the lib PyInquirer that prompts the questions, they already fixed it but still no new release. https://github.com/CITGuru/PyInquirer/issues/41

arthurbdiniz commented 4 years ago

When they release the new version from master we will just need to update the module and replace:

answers['workspace']
# to
answers.get('workspace', 'default')