Skip to content

Consistently return path as binary in relative_to_cwd#15316

Merged
josevalim merged 3 commits intoelixir-lang:mainfrom
lukaszsamson:ls-fix-relative_to_cwd-return
Apr 28, 2026
Merged

Consistently return path as binary in relative_to_cwd#15316
josevalim merged 3 commits intoelixir-lang:mainfrom
lukaszsamson:ls-fix-relative_to_cwd-return

Conversation

@lukaszsamson
Copy link
Copy Markdown
Contributor

Previously if path parameter was passed in as chardata it was returned as is on :file.get_cwd failure All relative_to and join code paths normalize to binary

Previously if path parameter was passed in as chardata it was returned as is on `:file.get_cwd` failure
All `relative_to` and `join` code paths normalize to binary
Copy link
Copy Markdown
Contributor

@sabiwara sabiwara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @lukaszsamson 💜
Maybe we could have a test case for this?

@lukaszsamson
Copy link
Copy Markdown
Contributor Author

Thank you @lukaszsamson 💜 Maybe we could have a test case for this?

Done, I added unix only test for that scenario

Comment thread lib/elixir/test/elixir/path_test.exs Outdated
@josevalim josevalim merged commit e39a1ca into elixir-lang:main Apr 28, 2026
15 checks passed
@josevalim
Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants