Skip to content

Commit

Permalink
Merge pull request #438 from rdoeffinger/checkconfig
Browse files Browse the repository at this point in the history
For config check, check that the selected binary is available.
  • Loading branch information
annejan committed Dec 17, 2018
2 parents f3b41ae + 2f39223 commit c237352
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ QString Util::findBinaryInPath(QString binary) {
bool Util::checkConfig() {
return !QFile(QDir(QtPassSettings::getPassStore()).filePath(".gpg-id"))
.exists() ||
(!QtPassSettings::getPassExecutable().startsWith("wsl ") &&
!QFile(QtPassSettings::getPassExecutable()).exists() &&
(QtPassSettings::isUsePass() ?
!QtPassSettings::getPassExecutable().startsWith("wsl ") &&
!QFile(QtPassSettings::getPassExecutable()).exists() :
!QtPassSettings::getGpgExecutable().startsWith("wsl ") &&
!QFile(QtPassSettings::getGpgExecutable()).exists());
}
Expand Down

0 comments on commit c237352

Please sign in to comment.