Windows support doesn't use native tools to execute commands. The current windows support expects "sh" to be installed on the PATH. While on a developer machine these tools might be available via git tooling such as git for windows (which installs git bash and other binaries), on a system server these will likely not be available:
PS C:\projects\goss\goss-alpha-windows-amd64.exe --use-alpha=1 -g="integration-tests/goss/windows/tests/command.goss.yaml" validate
2020/10/12 09:05:31 WARNING: goss for this platform ("Windows") is alpha-quality, work-in-progress, and not yet exercised within continuous integration.
You should not expect everything to work. Treat linux as the canonical behaviour to expect.
Please see https://github.com/aelsabbahy/goss/tree/master/docs/platform-feature-parity.md to set your expectations and see progress.
Please file issues via https://github.com/aelsabbahy/goss/issues/new/choose
Pull requests and bug reports very welcome.
FF
Failures/Skipped:
hello world: exit-status: Error: exec: "sh": executable file not found in %PATH%
hello world: stdout: Error: exec: "sh": executable file not found in %PATH%
How To Reproduce
Open Powershell prompt on a Windows 10 or Windows Server that doesn't have git installed or any other similar tooling.
Describe the bug
Windows support doesn't use native tools to execute commands. The current windows support expects "sh" to be installed on the PATH. While on a developer machine these tools might be available via git tooling such as git for windows (which installs git bash and other binaries), on a system server these will likely not be available:
How To Reproduce
curl.exe -LO https://github.com/aelsabbahy/goss/releases/download/v0.3.13/goss-alpha-windows-amd64.exe
curl.exe -LO https://raw.githubusercontent.com/aelsabbahy/goss/master/integration-tests/goss/windows/tests/command.goss.yaml
.\goss-alpha-windows-amd64.exe --use-alpha=1 -g="command.goss.yaml" validate
Expected Behavior
The command should pass and use
cmd
orpowershell
to execute the command with out any third party tooling required.Actual Behavior
goss uses
sh
which is only installed via third party tooling such as git for windows.Other info The tests are passing in CI because it looks like TravisCI adds these tools to the PATH which includes
sh
binary:Environment: