Print error if no command was supplied
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index 59a6b38..04aa858 100644
--- a/src/ideviceinstaller.c
+++ b/src/ideviceinstaller.c
@@ -412,7 +412,11 @@
 		}
 	}
 
-	if (optind <= 1 || (argc - optind > 0)) {
+	if (cmd == CMD_NONE) {
+		printf("ERROR: No mode/operation was supplied.\n");
+	}
+
+	if (cmd == CMD_NONE || optind <= 1 || (argc - optind > 0)) {
 		print_usage(argc, argv);
 		exit(2);
 	}