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

Set LC_CTYPE to UTF-8 on macOS #16

Merged
merged 1 commit into from
May 13, 2017

Conversation

floatdrop
Copy link
Collaborator

Closes #15

@sindresorhus
Copy link
Owner

No, I meant we should override whatever the user have. It should always be UTF8. Both for consistency and to prevent user mistakes.

@sindresorhus
Copy link
Owner

Instead pass it as the env option to execa:

copy: opts => execa('pbcopy', opts),

@floatdrop floatdrop force-pushed the set-lc-type branch 2 times, most recently from fb0cd54 to ffee000 Compare May 12, 2017 19:01
@sindresorhus
Copy link
Owner

Tests are failing since you're overriding env which contains the PATH, so it can no longer find the binaries. You also need to Object.assign() the env option. I guess it would be useful if execa had an extendEnv option, as I've fallen for this before too.

@floatdrop
Copy link
Collaborator Author

@sindresorhus thanks for tips! extendEnv is good idea.

screen shot 2017-05-13 at 14 38 20

@sindresorhus
Copy link
Owner

Done: sindresorhus/execa#87

@sindresorhus sindresorhus changed the title Set LC_CTYPE to UTF-8 in macos Set LC_CTYPE to UTF-8 on macOS May 13, 2017
@sindresorhus sindresorhus merged commit ed9bda5 into sindresorhus:master May 13, 2017
@sindresorhus
Copy link
Owner

Great! Thanks for fixing this :)

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