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

bit sync buggy behaviour with non-English locale #47

Closed
veksha opened this issue Oct 14, 2020 · 4 comments · Fixed by #73
Closed

bit sync buggy behaviour with non-English locale #47

veksha opened this issue Oct 14, 2020 · 4 comments · Fixed by #73
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@veksha
Copy link

veksha commented Oct 14, 2020

expected response: nothing to save or commit
actual response: Please provide a description of your changes...

LANG=en_EN.UTF-8 bit sync -> OK
LANG=ru_RU.UTF-8 bit sync -> not OK

therefore, bit sync -> not OK for me.

@chriswalz
Copy link
Owner

Thanks for filing this. Error is due to this line probably https://github.com/chriswalz/bit/blob/master/cmd/util.go#L94.

Perhaps its time to start leveraging go-git more https://github.com/go-git/go-git

@chriswalz chriswalz added bug Something isn't working good first issue Good for newcomers labels Oct 14, 2020
@veksha
Copy link
Author

veksha commented Oct 14, 2020

cmd := exec.Command("git", "status")
cmd.Env = append(os.Environ(), "LANG=C")
msg, err := cmd.CombinedOutput()

i have zero skill in golang, but something like above code can be enough.
what do you think, @chriswalz

@chriswalz
Copy link
Owner

chriswalz commented Oct 14, 2020

@veksha Yes I like the idea. I think that would work. Any ideas as to why LANG=ru_RU.UTF-8 git status is still printing in english on my end? I'm trying to replicate the issue

@veksha
Copy link
Author

veksha commented Oct 14, 2020

@chriswalz i guess you have to generate this locale.
example for ubuntu: https://help.ubuntu.com/community/Locale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants