Skip to content

Commit 89e0c5f

Browse files
committed
0.64-only fix: make generate-specs play well if bashrc has a cd command
1 parent 3297ac9 commit 89e0c5f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

scripts/generate-specs.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ main() {
6262
exit 1
6363
fi
6464

65+
# Make sure we're in the directory where the React Native binary lives.
66+
# Works around issues where the user's .bashrc has a "cd XXX"
67+
# and should be removable in 0.65 since this script has its logic
68+
# changed significantly
69+
cd "$RN_DIR/../.." || exit 1
70+
6571
CODEGEN_PATH=$("$NODE_BINARY" -e "console.log(require('path').dirname(require.resolve('react-native-codegen/package.json')))")
6672

6773
# Special case for running CodeGen from source: build it

0 commit comments

Comments
 (0)