cli-common: fix drive letter for target dir being lowercased on Windows
This commit is contained in:
@@ -106,7 +106,10 @@ export function findOwnRootDir(ownDir: string) {
|
||||
*/
|
||||
export function findPaths(searchDir: string): Paths {
|
||||
const ownDir = findOwnDir(searchDir);
|
||||
const targetDir = fs.realpathSync(process.cwd());
|
||||
// Drive letter can end up being lowercased here on Windows, bring back to uppercase for consistency
|
||||
const targetDir = fs
|
||||
.realpathSync(process.cwd())
|
||||
.replace(/^[a-z]:/, str => str.toUpperCase());
|
||||
|
||||
// Lazy load this as it will throw an error if we're not inside the Backstage repo.
|
||||
let ownRoot = '';
|
||||
|
||||
Reference in New Issue
Block a user