Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes bug #1185 where the password from the CLI wouldn't be send to KeePassXC #1336

Closed
wants to merge 15 commits into from
7 changes: 6 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ int main(int argc, char** argv)
QCommandLineOption parentWindowOption(QStringList() << "pw"
<< "parent-window",
QCoreApplication::translate("main", "Parent window handle"),
"handle");
"handle");

parser.addHelpOption();
parser.addVersionOption();
Expand Down Expand Up @@ -149,6 +149,11 @@ int main(int argc, char** argv)
static QTextStream in(stdin, QIODevice::ReadOnly);
password = in.readLine();
}
#ifdef Q_OS_WIN
mainWindow.openDatabase(filename, parser.value(pwstdinOption), parser.value(keyfileOption));
#else
mainWindow.openDatabase(filename, password, parser.value(keyfileOption));
#endif
}
}

Expand Down