Module unicorn.remote

Functions for installing packages from a package remote.

Index

Function

install()

Installs a package from a remote.

Api reference

unicorn.remote.install(package_name: string): nil

Installs a package from a remote.

This function traverses /rom/config/unicorn/remotes and then /etc/unicorn/remotes for all txt files that contain URLs to a [package remote](https://unicornpkg.github.io/spec/v1.0.0/package-remotes.html).

For each remote, it tries requesting the remote’s URL plus the package’s name. If it fails with a Not Found error, it moves on. If it gets a good response, then it installs the package.

Example

Installs MCJack123’s AUKit, assuming a remote hosting it is configured. >>> local unicorn = require(“unicorn”) >>> unicorn.remote.install(“aukit”)

Parameters:

package_name (string) – The name of the package