[protoc_wrapper] Do not add --import-dir if it doesn't exist

The original issue was `warning: directory does not exist` output in remote proto wrapper command.
https://crrev.com/c/4812586 suppressed it by including --import-dir to remote inputs. But it turned out that it sometimes crushes Reproxy.

This CL instead fixes `protoc_wrapper.py` to check the presence of `--import-dir`.

Fixed: b/297428306, b/298129445
Change-Id: I79bb902af138d7517f8dbd82880639565c59d01d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4829386
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
Cr-Commit-Position: refs/heads/main@{#1191120}
NOKEYCHECK=True
GitOrigin-RevId: 427382dd9083dc5c5d2b81975e0bdbb7c9300fce
1 file changed
tree: 9938b00cfd521c4e3e269ab2bd53219b25088060
  1. protoc_convert.py
  2. protoc_wrapper.py
  3. protoc_wrapper_test.py