Skip to content

Is using box-scripts the correct implementation for the API? #2

@clubdeuce

Description

@clubdeuce

While implementing this first version of the API, I have begun to question whether calling the CLI is the correct way to do this.

The issues are:

  1. BASH scripts can only return exit codes. As a result, it is difficult to get information from the commands, e.g. which version of PHP is the current default? (This can most likely be addressed using wplib.box.json, provided we can find a way to unequivocally ensure that the state of the box matches the information in the json file.)
  2. Currently, there are no exit codes implemented for the CLI. As a result, the API must assume that the command succeeded even though it may not have (see Should we implement exit codes? wplib/box-scripts#10).

Other issues may arise, but these two are most obvious now that we are implementing the box console.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions