-
Notifications
You must be signed in to change notification settings - Fork 7
[UX] Provide better error when using bad install #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Uilian Ries <[email protected]>
Signed-off-by: Uilian Ries <[email protected]>
Signed-off-by: Uilian Ries <[email protected]>
|
Looks good! |
Co-authored-by: David Sánchez Falero <[email protected]>
Co-authored-by: David Sánchez Falero <[email protected]>
|
@davidsanfal Thank you for your review. Your suggestions are now merged into the code. |
|
Looks good! |
I gonna check it! |
Signed-off-by: Uilian Ries <[email protected]>
|
@czoido @davidsanfal I made a small change for uninstall message as well. Previously, it was:
Now, when trying to uninstall a file instead of a directory, it will be:
|
When installing a script using
tome install -ebut instead of pointing to the folder where those scripts are, when pointing to a specific script, the command fails with an not expected scenario:tome install -e ~/Development/tome/tome-commands/ansible/list_inventories.py Error: Traceback (most recent call last): File "/home/uilian/Development/tome/tomescripts/tome/cli.py", line 405, in main cli.run(args) File "/home/uilian/Development/tome/tomescripts/tome/cli.py", line 337, in run command.run(self._tome_api, args[0][1:]) File "/home/uilian/Development/tome/tomescripts/tome/command.py", line 177, in run info = self._method(tome_api, self.parser, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/uilian/Development/tome/tomescripts/tome/commands/install.py", line 67, in install result = tome_api.install.install_editable(source, args.force_requirements, args.create_env) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/uilian/Development/tome/tomescripts/tome/api/subapi/install.py", line 15, in install_editable return install_editable(source, self.tome_api.cache_folder, force_requirements, create_env) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/uilian/Development/tome/tomescripts/tome/internal/installer.py", line 236, in install_editable if not _has_valid_commands(source.uri): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/uilian/Development/tome/tomescripts/tome/internal/installer.py", line 169, in _has_valid_commands for subdir_name in os.listdir(directory): ^^^^^^^^^^^^^^^^^^^^^ NotADirectoryError: [Errno 20] Not a directory: '/home/uilian/Development/tome/tome-commands/ansible/list_inventories.py'Using the following PR content, the output will be: