Skip to content
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

Improve the select boot failure help. #145

Merged
merged 2 commits into from
Sep 19, 2023

Conversation

jsirois
Copy link
Collaborator

@jsirois jsirois commented Sep 19, 2023

This fixes the error messages displayed when a boot command could not be
found by both differentiating the cases where this can occur with their
own specialized messages and improving the guidance in general.

As part of these messaging fixes, support for hiding commands is added
by omitting descriptions for those named commands you wish to hide from
the boot failure help screen.

Fixes #143
Fixes #144

This fixes the error messages displayed when a boot command could not be
found by both differentiating the cases where this can occur with their
own specialized messages and improving the guidance in general.

As part of these messaging fixes, support for hiding commands is added
by omitting descriptions for those named commands you wish to hide from
the boot failure help screen.

Fixes a-scie#143
Fixes a-scie#144
@jsirois jsirois marked this pull request as ready for review September 19, 2023 18:39
@jsirois
Copy link
Collaborator Author

jsirois commented Sep 19, 2023

For the motivating user-confusion case from scie-pants, I applied this diff to its science lift manifest:

diff --git a/package/scie-pants.toml b/package/scie-pants.toml
index 6c9cabc..9b02909 100644
--- a/package/scie-pants.toml
+++ b/package/scie-pants.toml
@@ -53,7 +53,7 @@ exe = "{scie-pants.bin}"
 # Run Pants
 [[lift.commands]]
 name = "pants"
-description = "Runs a hermetic Pants installation."
+#description = "Runs a hermetic Pants installation."
 exe = "{scie.bindings.install:PANTS_CLIENT_EXE}"
 args = [
     "{scie.bindings.configure:PANTS_SHA_FIND_LINKS}",
@@ -69,7 +69,7 @@ _PANTS_SERVER_EXE = "{scie.bindings.install:PANTS_SERVER_EXE}"
 # Run Pants Debug Mode
 [[lift.commands]]
 name = "pants-debug"
-description = "Runs a hermetic Pants installation with a debug server for debugging Pants code."
+#description = "Runs a hermetic Pants installation with a debug server for debugging Pants code."
 exe = "{scie.bindings.install:VIRTUAL_ENV}/bin/pants"
 args = [
     "-c",

And now, for the users specific case you get:

$ export SCIE_BOOT="update pants"
$ ./dist/better-help/pants
Error: `SCIE_BOOT=update pants` was found in the environment but "update pants" does not correspond to any scie-pants commands.

Isolates your Pants from the elements.

Please select from the following boot commands:

<default> (when SCIE_BOOT is not set in the environment)  Detects the current Pants installation and launches it.
bootstrap-tools                                           Introspection tools for the Pants bootstrap process.
update                                                    Update scie-pants.

You can select a boot command by setting the SCIE_BOOT environment variable.

@jsirois jsirois requested a review from kaos September 19, 2023 18:50
Copy link
Collaborator

@huonw huonw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

jump/src/context.rs Outdated Show resolved Hide resolved
@jsirois jsirois merged commit 5225017 into a-scie:main Sep 19, 2023
9 checks passed
@jsirois jsirois deleted the BusyBox/improve-help branch September 19, 2023 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants