envtest: Allow shell to be specified in properties

Bug: b/288300082
Change-Id: I01b837fe829dd7f90ac95e0477500c25a6a8140b
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/152690
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Carlos Chinchilla <cachinchilla@google.com>
diff --git a/recipes/envtest.proto b/recipes/envtest.proto
index 8e27007..26d4df2 100644
--- a/recipes/envtest.proto
+++ b/recipes/envtest.proto
@@ -37,4 +37,7 @@
 
   // Checkout module options.
   recipe_modules.pigweed.checkout.Options checkout_options = 5;
+
+  // Shell to use when bootstrapping. Defaults to 'sh'. Ignored on Windows.
+  string shell = 6;
 }
diff --git a/recipes/envtest.py b/recipes/envtest.py
index bacd5ba..4aa4ea7 100644
--- a/recipes/envtest.py
+++ b/recipes/envtest.py
@@ -90,7 +90,7 @@
             if api.platform.is_win:
                 api.step(base, [sh_path])
             else:
-                api.step(base, ['sh', '-x', sh_path])
+                api.step(base, [props.shell or 'sh', '-x', sh_path])
 
         api.save_logs((env_root,))