resolve cmd ambiguity, just support pipe input (#124)
This commit is contained in:
parent
27977765e8
commit
43521f603c
6
main.cpp
6
main.cpp
|
|
@ -70,7 +70,6 @@ int main(int argc, char **argv) {
|
||||||
("commands ,o", po::bool_switch(&commands), "Keep parent process alive and process commands. ")
|
("commands ,o", po::bool_switch(&commands), "Keep parent process alive and process commands. ")
|
||||||
("mountpoint,m", po::value<std::string>(), "Specify where pCloud filesystem is mounted.")
|
("mountpoint,m", po::value<std::string>(), "Specify where pCloud filesystem is mounted.")
|
||||||
("commands_only,k", po::bool_switch(&commands_only), "Open command prompt to interact with running daemon.")
|
("commands_only,k", po::bool_switch(&commands_only), "Open command prompt to interact with running daemon.")
|
||||||
("command,c", po::value<std::string>(), "Execute a single command and exit.")
|
|
||||||
("newuser,n", po::bool_switch(&newuser), "Register a new pCloud user account.")
|
("newuser,n", po::bool_switch(&newuser), "Register a new pCloud user account.")
|
||||||
("savepassword,s", po::bool_switch(&save_pass), "Save user password in the database.");
|
("savepassword,s", po::bool_switch(&save_pass), "Save user password in the database.");
|
||||||
|
|
||||||
|
|
@ -100,11 +99,6 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("command")) {
|
|
||||||
std::string command = vm["command"].as<std::string>();
|
|
||||||
return ct::process_command(command);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ((!vm.count("username"))) {
|
if ((!vm.count("username"))) {
|
||||||
std::cout << "Username option is required, specify with "
|
std::cout << "Username option is required, specify with "
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue