File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ const path = require('path');
1111
1212// On Windows, require.resolve through symlinks (e.g. yarn workspace links) can
1313// return paths with a different drive letter case than process.cwd(). Metro's
14- // file system lookup is case-sensitive, so we must normalize to match.
14+ // file system lookup is case-sensitive, so we normalize to match cwd .
1515function normalizePathDrive ( p ) {
1616 if ( process . platform === 'win32' && p . length >= 2 && p [ 1 ] === ':' ) {
17- return p [ 0 ] . toUpperCase ( ) + p . slice ( 1 ) ;
17+ return process . cwd ( ) [ 0 ] + p . slice ( 1 ) ;
1818 }
1919 return p ;
2020}
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ const path = require('path');
55
66// On Windows, require.resolve through yarn workspace junctions can return paths
77// with a different drive letter case than process.cwd(). Metro's internal file
8- // system lookup is case-sensitive, so we normalize to match.
8+ // system lookup is case-sensitive, so we normalize to match cwd .
99function normalizePathDrive ( p ) {
1010 if ( process . platform === 'win32' && p . length >= 2 && p [ 1 ] === ':' ) {
11- return p [ 0 ] . toUpperCase ( ) + p . slice ( 1 ) ;
11+ return process . cwd ( ) [ 0 ] + p . slice ( 1 ) ;
1212 }
1313 return p ;
1414}
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ const path = require('node:path');
55
66// On Windows, require.resolve through yarn workspace junctions can return paths
77// with a different drive letter case than process.cwd(). Metro's internal file
8- // system lookup is case-sensitive, so we normalize to match.
8+ // system lookup is case-sensitive, so we normalize to match cwd .
99function normalizePathDrive ( p ) {
1010 if ( process . platform === 'win32' && p . length >= 2 && p [ 1 ] === ':' ) {
11- return p [ 0 ] . toUpperCase ( ) + p . slice ( 1 ) ;
11+ return process . cwd ( ) [ 0 ] + p . slice ( 1 ) ;
1212 }
1313 return p ;
1414}
Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ const modules = Object.keys({ ...pack.peerDependencies });
99
1010// On Windows, require.resolve through yarn workspace junctions can return paths
1111// with a different drive letter case than process.cwd(). Metro's internal file
12- // system lookup is case-sensitive, so we normalize to match.
12+ // system lookup is case-sensitive, so we normalize to match cwd .
1313function normalizePathDrive ( p ) {
1414 if ( process . platform === 'win32' && p . length >= 2 && p [ 1 ] === ':' ) {
15- return p [ 0 ] . toUpperCase ( ) + p . slice ( 1 ) ;
15+ return process . cwd ( ) [ 0 ] + p . slice ( 1 ) ;
1616 }
1717 return p ;
1818}
You can’t perform that action at this time.
0 commit comments