In that pattern PWD env variable takes precedence over process.cwd. However, this PWD variable may be inherited from the parent process and should not be passed down to child process when launched with cwd option.
This PR fixes this problem, by overriding PWD variable to point to cwd varlue when both are set. We also add stderr reading to metro subprocess such that it outputs error messages to the IDE logger.
This PR fixes an issue with some modules that use the following pattern for accessing the project directory: https://github.com/zoontek/react-native-bootsplash/blob/master/src/generate.ts#L23
In that pattern PWD env variable takes precedence over process.cwd. However, this PWD variable may be inherited from the parent process and should not be passed down to child process when launched with cwd option.
This PR fixes this problem, by overriding PWD variable to point to cwd varlue when both are set. We also add stderr reading to metro subprocess such that it outputs error messages to the IDE logger.