mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-05-14 02:14:52 +08:00
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.
This commit is contained in:
@@ -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]".`);
|
||||
|
||||
Reference in New Issue
Block a user