diff options
author | Dmitry Torokhov <dtor@chromium.org> | 2019-12-18 17:42:24 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-22 10:55:04 +0000 |
commit | 9daf7907a36f356fe5c6677e67728b2aa6478fd8 (patch) | |
tree | 9f46892903c18fd1877e79acfec3305a4bd7a1b4 /x86_64 | |
parent | d65265c63665ee00c8df83c2613e7dbb7b32a3de (diff) | |
download | crosvm-9daf7907a36f356fe5c6677e67728b2aa6478fd8.tar crosvm-9daf7907a36f356fe5c6677e67728b2aa6478fd8.tar.gz crosvm-9daf7907a36f356fe5c6677e67728b2aa6478fd8.tar.bz2 crosvm-9daf7907a36f356fe5c6677e67728b2aa6478fd8.tar.lz crosvm-9daf7907a36f356fe5c6677e67728b2aa6478fd8.tar.xz crosvm-9daf7907a36f356fe5c6677e67728b2aa6478fd8.tar.zst crosvm-9daf7907a36f356fe5c6677e67728b2aa6478fd8.zip |
When parsing --parameter <value> argument do not clobber parser errors
When parsing arguments in form of "--parameter <value>", because it is yet unclear whether the parameter needs a value or not, we first try to parse it together with the next argument, and if that fails, try to parse it standalone. If both fail, then we should take the error from the first one, as it is more informative. This way, doing crosvm run --plugin ... --plugin-mount bin --plugin-mount lib will fail with error that "bin is not absolute path" and not that value is missing for "--plugin-mount". BUG=None TEST=cargo test Change-Id: Icc3bb0fcab4fb90e38eff3d116679091b598120d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1975096 Commit-Queue: Dmitry Torokhov <dtor@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'x86_64')
0 files changed, 0 insertions, 0 deletions