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

Remove custom language pack behavior #291

Merged
merged 1 commit into from
Aug 24, 2021
Merged

Remove custom language pack behavior #291

merged 1 commit into from
Aug 24, 2021

Conversation

LysandreJik
Copy link
Member

The is_tracked_with_lfs method has branching logic set according to the contents of an error message. However, this error message comes from git which has localization support: if the default locale is set to something other than English, then the error message will be different.

While it isn't an issue in other parts of the library where we leverage this error message to give more information about the error, it would be an issue here as the end result is vastly different: from a return False to a raise Exception. Raising an exception here would result in a non-understandable error that would be complex to diagnose.

Instead, we choose to check if the folder is a git repository when an error is detected: if it is not, then the file is not tracked with GIT LFS. If it is a git repository but the command still resulted in an error, the error is raised.

Another possibility would have been to force the locale to be a given language, such as English with the following environment variable set: LC_ALL=en_EN before launching the program. This, however, relies on the user having the English language pack already installed in their environment, which may not be the case.

@LysandreJik LysandreJik merged commit dab2020 into main Aug 24, 2021
@LysandreJik LysandreJik deleted the language-packs branch August 24, 2021 09:48
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.

1 participant