Skip to content
This repository was archived by the owner on Jul 28, 2024. It is now read-only.
This repository was archived by the owner on Jul 28, 2024. It is now read-only.

"wp vp activate" doesn't check if VersionPress is already active #1313

@x1024

Description

@x1024

public function activate($args, $assoc_args)

Steps to reproduce:

  • I installed and activated the plugin, then followed the activation procedure in the admin panel of my website. The site was successfully activated, and a .git repo with an initial commit was created in the project's root.
  • Then I took a look at the CLI, and the first command was "wp vp activate". I decided to run it, for no particular reason.
  • I was surprised to see that the command attempted to "activate" the site a second time.

Suggestion:

Add a check for "VersionPress::isActive()" at the start of the activate() function, and if VP is already active - print a log message and quit.

Metadata

Metadata

Assignees

Labels

improvementImprovement of an existing functionality. See "feature" for new features.scope: coreCore VersionPress functionality like tracking actions, creating Git commits, etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions