On main: cline checkpoint session=1789059923966_jj6g7 run=7
This commit is contained in:
commit
f508a970f5
11 files changed
+700
-112
No files matched your search
@@ -48,6 +48,19 @@ public:
|
||||
// unit-tested without invoking sudo.
|
||||
static bool authFailed(const std::string& output);
|
||||
|
||||
// Detect a locked pacman database (db.lck) in the output, either because
|
||||
// another manager runs concurrently or because a stale lock file remains.
|
||||
// Exposed as static so it can be unit-tested without invoking pacman.
|
||||
static bool dbLocked(const std::string& output);
|
||||
|
||||
// User-facing hint explaining the lock and how to recover. Checks the
|
||||
// lock file and other running managers on the live system.
|
||||
static std::string dbLockHint();
|
||||
|
||||
// Last error detail of the most recent failed privileged operation
|
||||
// (e.g. db lock hint), surfaced in the UI instead of a generic message.
|
||||
std::string lastError() const override { return m_lastError; }
|
||||
|
||||
// Credential handling for privileged (sudo) operations. The password is
|
||||
// kept in memory only for the session (never persisted) and piped to
|
||||
// `sudo -S` for each privileged command.
|
||||
@@ -70,4 +83,5 @@ private:
|
||||
bool isPackageInstalled(const std::string& name);
|
||||
|
||||
std::string m_password;
|
||||
std::string m_lastError;
|
||||
};
|
||||
Reference in new issue
Block a user