From 387e659d953ca1c11c291d7b6c26572bdd5c7ffe Mon Sep 17 00:00:00 2001 From: Gabe Giosia Date: Wed, 14 Aug 2019 14:46:44 -0400 Subject: [PATCH] Error when people pass args or envs with nolldb. LLDB is needed to set args/env, so the args/envs variables are ignored when using nolldb. --- src/ios-deploy/ios-deploy.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ios-deploy/ios-deploy.m b/src/ios-deploy/ios-deploy.m index 67bc724a..23b79a8c 100644 --- a/src/ios-deploy/ios-deploy.m +++ b/src/ios-deploy/ios-deploy.m @@ -1831,7 +1831,7 @@ void usage(const char* app) { @" -t, --timeout number of seconds to wait for a device to be connected\n" @" -u, --unbuffered don't buffer stdout\n" @" -n, --nostart do not start the app when debugging\n" - @" -N, --nolldb start debugserver only. do not run lldb\n" + @" -N, --nolldb start debugserver only. do not run lldb. Can not be used with args or envs options\n" @" -I, --noninteractive start in non interactive mode (quit when app crashes or exits)\n" @" -L, --justlaunch just launch the app and exit lldb\n" @" -v, --verbose enable verbose output\n" @@ -2037,6 +2037,11 @@ int main(int argc, char *argv[]) { return exitcode_error; } } + + if (debugserver_only && (args || envs)) { + usage(argv[0]); + on_error(@"The --args and --envs options can not be combined with --nolldb."); + } if (!app_path && !detect_only && !command_only) { usage(argv[0]);