From 3ccfa6752859eea91afe3c4d37ff432b98c92eea Mon Sep 17 00:00:00 2001 From: Luca Pau Date: Mon, 14 Nov 2016 21:07:55 +0100 Subject: [PATCH] Fix failure in react-native link on Windows (#603) Fix issue #530. Every so often you run the command react-native link an exception is thrown because the \n in regex does not lead to the line. --- scripts/postlink/ios/postlink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/postlink/ios/postlink.js b/scripts/postlink/ios/postlink.js index 7326efc..c49bcea 100644 --- a/scripts/postlink/ios/postlink.js +++ b/scripts/postlink/ios/postlink.js @@ -31,7 +31,7 @@ if (~appDelegateContents.indexOf(codePushHeaderImportStatement)) { } // 2. Modify jsCodeLocation value assignment -var oldJsCodeLocationAssignmentStatement = appDelegateContents.match(/(jsCodeLocation = .*)\n/)[1]; +var oldJsCodeLocationAssignmentStatement = appDelegateContents.match(/(jsCodeLocation = .*)/)[1]; var newJsCodeLocationAssignmentStatement = "jsCodeLocation = [CodePush bundleURL];"; if (~appDelegateContents.indexOf(newJsCodeLocationAssignmentStatement)) { console.log(`"jsCodeLocation" already pointing to "[CodePush bundleURL]".`);