Skip to content
6 changes: 6 additions & 0 deletions packages/cli/src/utils/resolvePath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ export function resolvePath(p: string): string {
expandedPath = homedir() + p.substring('%userprofile%'.length);
} else if (p === '~' || p.startsWith('~/')) {
expandedPath = homedir() + p.substring(1);
}
// If the path is too long, it's likely a prompt, not a file.
// Return it as is to avoid OS path length errors.
if (expandedPath.length > 1024) {
return expandedPath;
}
Comment thread
renuka16032007 marked this conversation as resolved.
Resolved
return path.normalize(expandedPath);

}