Skip to content

init: a directory of ./ means the current directory - #6428

Merged
TrapsterDK merged 1 commit into
mainfrom
issue-6211-init-dot-slash
Nov 4, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
issue-6211-init-dot-slash

Conversation

@TrapsterDK

@TrapsterDK TrapsterDK commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #6211

dx init ./ now means the current directory, the same as dx init ..

validate_init_dir strips ./ and then /. When nothing is left, it returns the current directory instead of splitting an empty path into one empty segment.

Changes:

  • cli/adopt/src/init_dir.rs: return "" when the directory is empty after the strips.
  • Same file, test current_directory_spellings_mean_no_subdirectory: add ./.

Not changed: repeated ./ prefixes (././) stay refused, as the issue allowed. / stays refused as an absolute path.

Checks:

  • tools/dx check --apply //cli/adopt/...: exit 0.
  • tools/dx test //cli/adopt/...: 2 pass, 1 fails: overrides::tests::table_matches_the_repo_module_bazel (gcc_toolchain patch list). It is in overrides.rs, which this change does not touch; not verified on main.
  • Not run: nested-Bazel and *_consumer_test targets (CI runs them).
  • Remaining for other platforms: none. The change is platform-independent.

🤖 Generated with Claude Code

@TrapsterDK
TrapsterDK merged commit 2e2d3d2 into main Nov 4, 2026
1 check failed
@TrapsterDK
TrapsterDK deleted the issue-6211-init-dot-slash branch November 4, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

init: a directory of ./ means the current directory

1 participant