Skip to content

Commit

Permalink
Add dependency + adjust styling.
Browse files Browse the repository at this point in the history
  • Loading branch information
louib committed Mar 16, 2017
1 parent 9cfc862 commit bf9b235
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ target_link_libraries(keepassxc-cli
keepassx_core
Qt5::Core
${GCRYPT_LIBRARIES}
${GPGERROR_LIBRARIES}
${ZLIB_LIBRARIES})
14 changes: 6 additions & 8 deletions src/cli/keepassxc-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,18 @@ int main(int argc, char **argv)
QString commandName = args.at(0);

for (int i = 1; i < argc - 1; ++i) {
argv[i] = argv[i+1];
argv[i] = argv[i + 1];
}
argv[argc - 1] = nullptr;
argc--;
--argc;

if (commandName == "merge")
{
argv[0] = const_cast<char *>("keepassxc-cli merge");
if (commandName == "merge") {
argv[0] = const_cast<char*>("keepassxc-cli merge");
return Merge::execute(argc, argv);
}

if (commandName == "extract")
{
argv[0] = const_cast<char *>("keepassxc-cli extract");
if (commandName == "extract") {
argv[0] = const_cast<char*>("keepassxc-cli extract");
return Extract::execute(argc, argv);
}

Expand Down

0 comments on commit bf9b235

Please sign in to comment.