Clarify the output when editing a service on the command line and a
mandatory subparameter was not supplied.
Thanks Chris Blaszczynski.
for (i = 0; settings[i].name; i++) _ftprintf(stderr, _T("%s\n"), settings[i].name);\r
return 1;\r
}\r
- if (argc < mandatory) return usage(1);\r
\r
additional = 0;\r
if (additional_mandatory) {\r
+ if (argc < mandatory) {\r
+ print_message(stderr, NSSM_MESSAGE_MISSING_SUBPARAMETER, parameter);\r
+ return 1;\r
+ }\r
additional = argv[3];\r
remainder = 4;\r
}\r
- else additional = argv[remainder];\r
+ else {\r
+ additional = argv[remainder];\r
+ if (argc < mandatory) return usage(1);\r
+ }\r
}\r
\r
nssm_service_t *service = alloc_nssm_service();\r