Skip to content

Extensions: Require slashes for local installs #356

@andreaphylum

Description

@andreaphylum

Currently, phylum extension add will install extensions from a local directory.

In the future, we may have a marketplace of extensions and it would make more sense that phylum extension add <extension-name> adds an extension from there.

To ensure that we can distinguish between local and marketplace installations in the future, the phylum extension add should enforce a specific format for local installs.

After discussion, we have decided that a local install will be required to use a slash in the phylum extension add command. For example:

phylum extension add foo          # Install `foo` from marketplace
phylum extension add ./foo        # Install from local directory `foo`
phylum extension add foo/bar      # Install from local directory `foo/bar`
phylum extension add /path/to/foo # Install from local directory `/path/to/foo`
phylum extension add C:\dev\foo   # Install from local directory `C:\dev\foo`

Error message

Since we do not currently support marketplace installs, any phylum extension add command that attempt to install from the marketplace will fail with a descriptive error message:

❗ Error: Attempting to install from marketplace, which is not yet supported. Did you mean `phylum extension add ./foo`

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestextensionsPhylum CLI extensionsmedium priorityShould be handled as soon as possible

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions