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

Should not error out "use --update to update it" if we pass --update flag #62

Closed
Dentrax opened this issue Nov 3, 2021 · 4 comments
Closed

Comments

@Dentrax
Copy link

Dentrax commented Nov 3, 2021

Since we are passing the --update flag, I think throwing the following error might be unnecessary. We can write different logs here to improve the error message: 1

$ tldr --update
Local data is older than two weeks, use --update to update it.
$ tldr --version
tldr v1.3.0 (v1.3.0)

Footnotes

  1. https://github.com/tldr-pages/tldr/issues/7376

@marchersimon
Copy link
Contributor

Hey @Dentrax, this repository only contains the pages themselves, and don't have much to do with any clients. Which client do you use / where did you install it from? Looks like the Node.js client, but I'm not sure.

@marchersimon
Copy link
Contributor

From looking at the source code, you seem to be using the C client.

@marchersimon marchersimon transferred this issue from tldr-pages/tldr Nov 3, 2021
@marchersimon
Copy link
Contributor

marchersimon commented Nov 3, 2021

@Dentrax this is really weird, because I don't have this issue. I don't even know how this issue can possibly arise, because this message get's printed here:

fprintf(stdout, "Local data is older than two weeks, use --update to update it.\n\n");

and the function is called here:

tldr-c-client/src/tldr.c

Lines 116 to 118 in af7501f

if (!update_flag) {
check_localdate();
}

So, when update_flag is true, the function can't get called. Where did you install the client and could you maybe recompile it yourself to see if the issue still exists?

@MasterOdin
Copy link
Contributor

This was fixed in 1cf890d as part of the 1.4.0 release

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

No branches or pull requests

3 participants