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

Add destination directory as argument to swift package init #7792

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

Conversation

eliperkins
Copy link

Closes #7791

This allows for specifying the directory to create a new package within. If no argument is supplied, matching the current supported command options, then the package will be created in the current working directory. If an argument is supplied, then the package will be created in the directory at the path specified.

Motivation:

The goal is to make the creation of new packages more predictable based on the arguments passed in, as well as to give more control to developers to specify the location of new packages, rather than relying on current working directory contexts and forcing the developer to mkdir and cd a bunch while using this command.

Modifications:

  • Added a single argument to swift package init to take in the directory to create the package at
  • Modified the progress print statements during creation to specify the relative directories that the package is being created in

Result:

  • The existing syntax for commands to swift package init is unchanged, where if no arguments are specified, the package will be created in the current working directory.
  • If an argument is specified, the package will be created at that destination path instead.

Closes swiftlang#7791

This allows for specifying the directory to create a new package within. If no argument is supplied, matching the current supported command options, then the package will be created in the current working directory. If an argument is supplied, then the package will be created in the directory at the path specified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant