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

fix: use forward slashes instead of path.sep in iOS link #618

Merged
merged 1 commit into from
Aug 7, 2019
Merged

fix: use forward slashes instead of path.sep in iOS link #618

merged 1 commit into from
Aug 7, 2019

Conversation

Taym95
Copy link
Contributor

@Taym95 Taym95 commented Aug 5, 2019

Fix #615

because react-native link on Windows gives incorrect path separator for Xcode.
@thymikee
Copy link
Member

thymikee commented Aug 5, 2019

@qwertzguy can you verify this works well for you?

@thymikee thymikee changed the title Use forward slashe instead of path.sep fix: use forward slashes instead of path.sep in iOS link Aug 5, 2019
Copy link
Member

@grabbou grabbou left a comment

Choose a reason for hiding this comment

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

As @thymikee said, waiting for someone to run and verify it, but this looks good to me. We shouldn't be using path.sep in this case, otherwise, we are breaking iOS projects when someone attempts linking from Windows.

@thymikee thymikee merged commit 53f51ef into react-native-community:master Aug 7, 2019
@Taym95 Taym95 deleted the @taym95/fix/remove-path-sep branch August 7, 2019 14:26
@@ -53,8 +53,8 @@ export default function getHeaderSearchPath(sourceDir, headers) {
const directories = union(headers.map(path.dirname));

return directories.length === 1
? `"$(SRCROOT)${path.sep}${path.relative(sourceDir, directories[0])}"`
: `"$(SRCROOT)${path.sep}${path.relative(
? `"$(SRCROOT)/${path.relative(sourceDir, directories[0])}"`

Choose a reason for hiding this comment

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

Won't path.relative use the OS specific separator?

Choose a reason for hiding this comment

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

I think you can use path.posix to switch to the posix implementation regardless of the OS.

Copy link
Member

Choose a reason for hiding this comment

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

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.

react-native link on Windows uses incorrect path separator for xcode
4 participants