diff --git a/packages/cli/src/ui/components/FolderTrustDialog.test.tsx b/packages/cli/src/ui/components/FolderTrustDialog.test.tsx
index c583617aae..649ae8967c 100644
--- a/packages/cli/src/ui/components/FolderTrustDialog.test.tsx
+++ b/packages/cli/src/ui/components/FolderTrustDialog.test.tsx
@@ -98,7 +98,15 @@ describe('FolderTrustDialog', () => {
});
});
- describe('parentFolder display', () => {
+ describe('directory display', () => {
+ it('should correctly display the folder name for a nested directory', () => {
+ mockedCwd.mockReturnValue('/home/user/project');
+ const { lastFrame } = renderWithProviders(
+ ,
+ );
+ expect(lastFrame()).toContain('Trust folder (project)');
+ });
+
it('should correctly display the parent folder name for a nested directory', () => {
mockedCwd.mockReturnValue('/home/user/project');
const { lastFrame } = renderWithProviders(
diff --git a/packages/cli/src/ui/components/FolderTrustDialog.tsx b/packages/cli/src/ui/components/FolderTrustDialog.tsx
index 0060187925..ebcadd7a35 100644
--- a/packages/cli/src/ui/components/FolderTrustDialog.tsx
+++ b/packages/cli/src/ui/components/FolderTrustDialog.tsx
@@ -46,11 +46,12 @@ export const FolderTrustDialog: React.FC = ({
{ isActive: !!isRestarting },
);
+ const dirName = path.basename(process.cwd());
const parentFolder = path.basename(path.dirname(process.cwd()));
const options: Array> = [
{
- label: 'Trust folder',
+ label: `Trust folder (${dirName})`,
value: FolderTrustChoice.TRUST_FOLDER,
},
{