Fix host-dir parsing in cos-extensions

Currently cos-extensions only handles the case where host-dir flag is passed as "host-dir=/some/path", but it can also be passed without the "=" sign. In that case, host-dir will default to empty, and daemons will  fail to start on the host vm.

Fix the parsing of the flag to allow for "host-dir /some/path" syntax.

BUG=b/498645820
TEST=Compile locally and run on VM, unit tests.
RELEASE_NOTE=None

Change-Id: I903a29793bf16dc8881e8dc3d6c49ad68ae1cd8e
Reviewed-on: https://cos-review.googlesource.com/c/cos/cos-extensions/+/142004
Reviewed-by: Kevin Berry <kpberry@google.com>
Tested-by: Miri Amarilio <mirilio@google.com>
2 files changed
tree: dd8e8e910dc6d113943b3d4d696c41263d543be0
  1. commands/
  2. extensions/
  3. tools/
  4. CONTRIBUTING.md
  5. cos-extensions.go
  6. go.mod
  7. go.sum
  8. README.md
README.md

cos-extensions for Container-Optimized OS

cos-extensions is a tool used in Container-Optimized OS. It provides utility to manage COS extensions.

See CONTRIBUTING.md for how to contribute.