Skip to content

Commit 67f29d2

Browse files
cogwirrelclaude
andcommitted
cleanup(misc): add docstring to isCurrentDirReference, simplify comment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1076781 commit 67f29d2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/create-nx-workspace/bin/create-nx-workspace.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,7 @@ export function validateWorkspaceName(name: string): void {
833833
}
834834
}
835835

836+
/** Returns `true` when the folder name refers to the current directory. */
836837
function isCurrentDirReference(folderName: string): boolean {
837838
return folderName === '.' || folderName === './';
838839
}
@@ -850,7 +851,7 @@ function isCurrentDirReference(folderName: string): boolean {
850851
export function resolveSpecialFolderName(
851852
folderName: string
852853
): { name: string; workingDir: string } | null {
853-
// Handle "." and "./" — user wants to init in the current directory
854+
// User wants to init in the current directory
854855
if (isCurrentDirReference(folderName)) {
855856
const cwd = resolve(process.cwd());
856857
if (readdirSync(cwd).length > 0) {

0 commit comments

Comments
 (0)