Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cargo new for non-existing directory #540

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

roife
Copy link

@roife roife commented Dec 5, 2023

fix #506.

The current implementation of rustic-cargo-new utilizes D within interactive, necessitating an existing path. However, the functionality of cargo new allows arguments for non-existing paths and automatically generates directories.

For instance, when executing cargo new a1/a2 within ~/source, Cargo generates a directory named a1 and a subdirectory a2 within a1. Subsequently, cargo new initializes a package within ~/source/a1/a2.

This proposed patch aims to enhance rustic-cargo-new by enabling acceptance of arbitrary paths. It will then determine the longest existing prefix of the path as the default-directory, utilizing the remainder as the project-name passed to cargo new.

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.

rustic-cargo-new has a little problem
1 participant