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

Gracefully handle missing pages #248

Closed
wants to merge 1 commit into from
Closed

Conversation

vladimyr
Copy link
Collaborator

@vladimyr vladimyr commented Feb 1, 2019

Description

This resolves #247 by listing alternative platforms if target one does not contain requested page ⚡️

Before

$ tldr trap --os=windows
✔ Page not found. Updating cache...
✔ Creating index...
Page not found.
If you want to contribute it, feel free to send a pull request to: https://github.com/tldr-pages/tldr

After

$ tldr trap --os=windows
✔ Page not found. Updating cache...
✔ Creating index...
Page `trap` not found on target platform (windows).

Available on: linux, osx
To view linux version run:
  $ tldr trap --os=linux
To view osx version run:
  $ tldr trap --os=osx

If you want to contribute it, feel free to send a pull request to: https://github.com/tldr-pages/tldr

Checklist

Please review this checklist before submitting a pull request.

  • Code compiles correctly
  • Created tests, if possible
  • All tests passing (npm run test:all)
  • Extended the README / documentation, if necessary

- listing alternative platforms if target one does not contain
  requested page
@agnivade
Copy link
Member

agnivade commented Feb 2, 2019

Thanks ! Is it possible to have some tests too ? 😄

@agnivade
Copy link
Member

@vladimyr - did you get a chance to look into this ? Should not take much time.

@vladimyr
Copy link
Collaborator Author

Thanks ! Is it possible to have some tests too ?

It certainly is :bowtie:

@vladimyr - did you get a chance to look into this ? Should not take much time.

True that but I'm being swamped lately so it will have to wait until I get some free time 😉

@agnivade
Copy link
Member

Fantastic. Thanks for the update.

@agnivade
Copy link
Member

ping @vladimyr. It would be good to get this in whenever you get some time.

@agnivade
Copy link
Member

Actually, this will be taken care of in my PR for lang support. I will integrate this platform resolution logic in the index.findPlatform function as dictated by the client spec.

I will close this @vladimyr. Sorry about that, and thank you for the contribution !

@agnivade agnivade closed this Nov 18, 2019
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.

Perform search if command is not found on current OS
2 participants