mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 15:04:16 -07:00
fix(ux): added error message for ENOTDIR (#26128)
This commit is contained in:
@@ -152,6 +152,19 @@ describe('getFsErrorMessage', () => {
|
||||
expected:
|
||||
'Operation timed out. The network connection or filesystem operation took too long.',
|
||||
},
|
||||
{
|
||||
code: 'ENOTDIR',
|
||||
message: 'ENOTDIR: not a directory',
|
||||
path: '/some/file.txt/inner',
|
||||
expected:
|
||||
"Not a directory: '/some/file.txt/inner'. Check if the path is correct and that all parent components are directories.",
|
||||
},
|
||||
{
|
||||
code: 'ENOTDIR',
|
||||
message: 'ENOTDIR: not a directory',
|
||||
expected:
|
||||
'Not a directory. Check if the path is correct and that all parent components are directories.',
|
||||
},
|
||||
];
|
||||
|
||||
it.each(testCases)(
|
||||
|
||||
@@ -52,6 +52,9 @@ const errorMessageGenerators: Record<string, (path?: string) => string> = {
|
||||
'Connection reset by peer. The network connection was unexpectedly closed.',
|
||||
ETIMEDOUT: () =>
|
||||
'Operation timed out. The network connection or filesystem operation took too long.',
|
||||
ENOTDIR: (path) =>
|
||||
(path ? `Not a directory: '${path}'. ` : 'Not a directory. ') +
|
||||
'Check if the path is correct and that all parent components are directories.',
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user