|
QtPass 2.0.0
Developer documentation
|
A configured executable that runs a Linux program through WSL. More...
#include <executor.h>
Public Member Functions | |
| auto | argv (const QStringList &args) const -> QStringList |
Arguments for launcher that run command with args. | |
| auto | with (const QString &program) const -> WslCommand |
| The same launcher and options running another program. | |
Public Attributes | |
| QString | launcher |
| What to start. | |
| QStringList | options |
| wsl.exe options that go before the program (-d Debian, -u me), without any -e/--exec: argv() always adds that. | |
| QString | command |
| The Linux program to run, looked up on the WSL PATH. | |
A configured executable that runs a Linux program through WSL.
The one definition of "a WSL command" in QtPass; see parseWslCommand().
Definition at line 328 of file executor.h.
| auto Executor::WslCommand::argv | ( | const QStringList & | args | ) | const -> QStringList |
Arguments for launcher that run command with args.
Always through --exec, so WSL starts the program itself instead of handing the joined command line to the distribution's default shell. Without it every argument (entry paths, .gpg-id recipients, commit messages) is word-split and $()-expanded by that shell, and a hostile password store gets code execution.
| args | Arguments for command, passed through verbatim. |
Definition at line 106 of file executor.cpp.
| auto Executor::WslCommand::with | ( | const QString & | program | ) | const -> WslCommand |
The same launcher and options running another program.
| program | Linux program to run instead of command. |
program. Definition at line 110 of file executor.cpp.
| QString Executor::WslCommand::command |
The Linux program to run, looked up on the WSL PATH.
Definition at line 344 of file executor.h.
| QString Executor::WslCommand::launcher |
What to start.
On Windows a bare wsl/wsl.exe in any case becomes wsl, which the PATH lookup resolves; elsewhere (QtPass itself running inside WSL, where wsl.exe is reachable through interop but wsl need not be) and for a launcher given as a path it stays as configured.
Definition at line 337 of file executor.h.
| QStringList Executor::WslCommand::options |
wsl.exe options that go before the program (-d Debian, -u me), without any -e/--exec: argv() always adds that.
Definition at line 342 of file executor.h.