Commit c8c82e01 authored by Nicolas Fella's avatar Nicolas Fella

[cli] Warn user if specified device id doesn't exist

parent 01fa9897
Pipeline #7668 canceled with stage
......@@ -183,6 +183,11 @@ int main(int argc, char** argv)
parser.showHelp(1);
}
if (!blockOnReply<QStringList>(iface.devices(false, false)).contains(device)) {
QTextStream(stderr) << "Couldn't find device with id \"" << device << "\". To specify a device by name use -n <devicename>" << endl;
return 1;
}
if (parser.isSet(QStringLiteral("share"))) {
QStringList urls;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment