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

Command: criticalup doc #78

Merged
merged 13 commits into from
Jan 27, 2025
Merged

Command: criticalup doc #78

merged 13 commits into from
Jan 27, 2025

Conversation

amanjeev
Copy link
Member

Adds a sub-command doc so the user does not have to look for docs manually.

For a given installation:

  • criticalup doc opens the doc url in default browser on the system.
  • criticalup doc --path prints the path to the doc root.

@amanjeev amanjeev self-assigned this Jan 23, 2025
@amanjeev amanjeev marked this pull request as ready for review January 23, 2025 18:05
@@ -120,6 +120,19 @@ pub(crate) enum Error {
tracing_subscriber::util::TryInitError,
),

#[error("Failed to open document in the browser at {}", path.display())]
Copy link
Member

Choose a reason for hiding this comment

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

Can we provide the user with a proper file url for their browser so they can link-click it or paste it directly?

I think you can use https://docs.rs/url/latest/url/struct.Url.html#method.from_file_path

Copy link
Member Author

Choose a reason for hiding this comment

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

I like this idea. Let me change this.

@Hoverbear
Copy link
Member

Rest looks good. :)

@amanjeev amanjeev force-pushed the amanjeev/sub-command-doc branch from 45cee7a to 474ec74 Compare January 24, 2025 15:46
Tests should not open users' browsers.

Reviewed-by: Ana Hobden <ana.hobden@ferrous-systems.com>
Reviewed-by: Ana Hobden <ana.hobden@ferrous-systems.com>
@amanjeev amanjeev force-pushed the amanjeev/sub-command-doc branch from 739c1c3 to 439f036 Compare January 24, 2025 23:04
Hoverbear
Hoverbear previously approved these changes Jan 27, 2025
@Hoverbear Hoverbear force-pushed the amanjeev/sub-command-doc branch from 27bde10 to f34f237 Compare January 27, 2025 17:32
@Hoverbear
Copy link
Member

bors merge

@bors-ferrocene
Copy link
Contributor

👎 Rejected by too few approved reviews

Copy link
Member

@Hoverbear Hoverbear left a comment

Choose a reason for hiding this comment

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

bors merge

@bors-ferrocene
Copy link
Contributor

Build succeeded:

@bors-ferrocene bors-ferrocene bot merged commit f8b9a62 into main Jan 27, 2025
13 checks passed
@bors-ferrocene bors-ferrocene bot deleted the amanjeev/sub-command-doc branch January 27, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants