From 10018641a512f0aa3d9433200536f6850eaf2104 Mon Sep 17 00:00:00 2001 From: nqb Date: Wed, 11 Dec 2019 16:09:07 +0100 Subject: [PATCH] [docs] add example for 'env' option --- website/source/docs/provisioning/shell.html.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/website/source/docs/provisioning/shell.html.md b/website/source/docs/provisioning/shell.html.md index 6cd3d70c2..983555102 100644 --- a/website/source/docs/provisioning/shell.html.md +++ b/website/source/docs/provisioning/shell.html.md @@ -52,6 +52,17 @@ The remainder of the available options are optional: the script. Vagrant will handle quoting for environment variable values, but the keys remain untouched. + Example: + + ```ruby + s.env = { + PERL_TESTS: "ENV['PERL_TESTS'] || yes", + GOLANG_TESTS: "ENV['GOLANG_TESTS'] || yes" + } + ``` + This syntax allow you to redefine environment variables on command line when + running Vagrant: `PERL_TESTS=no vagrant up`. + * `keep_color` (boolean) - Vagrant automatically colors output in green and red depending on whether the output is from stdout or stderr. If this is true, Vagrant will not do this, allowing the native colors from the script