feat(cli): add a simplified command line over the logic layer
The window needs a display, which kept the package manager out of a script and off a headless machine. The command line runs the same operations through AppCore, before any widget exists, so providers, the pacman lock, the journal and the history behave exactly as in the window. Refs #22.
This commit is contained in:
11 files changed
+1055
-5
No files matched your search
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
// Runs a parsed command line against the logic layer (AppCore) and prints the
|
||||
// result. No widget is built: the command line works on a machine without a
|
||||
// display, and the operations are exactly the ones the window runs.
|
||||
namespace cli {
|
||||
|
||||
// `args` is the command line, program name excluded. Returns the process exit
|
||||
// code: 0 on success, 1 when an operation failed, 2 on a usage error.
|
||||
int run(const QStringList& args);
|
||||
|
||||
} // namespace cli
|
||||
Reference in new issue
Block a user