Skip to content

force the user to provide "." as path#5004

Closed
thyseus wants to merge 1 commit into
DioxusLabs:mainfrom
thyseus:dx-init-not-empty
Closed

force the user to provide "." as path#5004
thyseus wants to merge 1 commit into
DioxusLabs:mainfrom
thyseus:dx-init-not-empty

Conversation

@thyseus

@thyseus thyseus commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

when creating a project in the current directory is requested.

The default behavior simply creates the project at "." no matter where i are. Maybe i am not even in a rust project or in my home directory. This most probably is not the wanted behavior the user requested.

When making the parameter required the user is forced to consciously confirm that he wants that behavior by providing a .

error: the following required arguments were not provided:
  <PATH>

Usage: dx init <PATH>
Init a new project for Dioxus in a given directory. Will attempt to keep your project in a good state

Usage: dx init [OPTIONS] <PATH>

Arguments:
  <PATH>  Please provide "." if you are sure you want to create the project inside the current directory

@thyseus thyseus requested a review from a team as a code owner November 21, 2025 10:24
@LeWimbes

Copy link
Copy Markdown
Contributor

I think the current behavior is good as it is.
It matches the way cargo init works.

@thyseus

thyseus commented Nov 21, 2025

Copy link
Copy Markdown
Contributor Author

You are right. Closing the issue.

@thyseus thyseus closed this Nov 21, 2025
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.

2 participants