Skip to main content

add_package

Function add_package 

Source
pub fn add_package(
    registry_root: &Path,
    name: Option<&str>,
    repo: Option<&str>,
) -> Result<(), Error>
Expand description

Adds a new package definition to the registry.

This creates a new directory for the package and a template .pkg.lua file. If name or repo are not provided, it prompts the user for input.

ยงErrors

Returns an error if:

  • The path is not a Zoi registry.
  • Package name or repository tier are not provided.
  • The package directory cannot be created.
  • The package already exists.