From 29b8bb35962248a1a64744a40f1c2c2b09ebfd7c Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Tue, 21 Apr 2020 09:27:43 -0700 Subject: [PATCH] Fixes #9142 Add more information about shell script extensions This commit updates the shell provisioner docs to be more descriptive about the kinds of extensions you can use with Windows --- website/source/docs/provisioning/shell.html.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/website/source/docs/provisioning/shell.html.md b/website/source/docs/provisioning/shell.html.md index 0d061dac9..362831ff2 100644 --- a/website/source/docs/provisioning/shell.html.md +++ b/website/source/docs/provisioning/shell.html.md @@ -200,8 +200,15 @@ end If you are running a Batch or PowerShell script for Windows, make sure that the external path has the proper extension (".bat" or ".ps1"), because -Windows uses this to determine what kind of file it is to execute. If you -exclude this extension, it likely will not work. +Windows uses this to determine what kind of file it is to execute. Additionally, +if you are running Vagrant on something like Cygwin or WSL where bash is +available, then you should be able to use an extension like ".sh". + +```ruby +Vagrant.configure("2") do |config| + config.vm.provision "shell", path: "scripts/PowershellScript.ps1" +end +``` To run a script already available on the guest you can use an inline script to invoke the remote script on the guest.