From 1836853955e51efbaf4aba7dec0718e51747b418 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 31 Dec 2019 14:21:57 -0500 Subject: ci: test powershell core on Linux --- test/functional/helpers.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/functional/helpers.lua') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index eead1ea3e0..0fdfcd70ba 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -504,9 +504,13 @@ function module.source(code) return fname end +function module.has_powershell() + return module.eval('executable("'..(iswin() and 'powershell' or 'pwsh')..'")') == 1 +end + function module.set_shell_powershell() local shell = iswin() and 'powershell' or 'pwsh' - assert(module.eval('executable("'..shell..'")')) + assert(module.has_powershell()) local cmd = 'Remove-Item -Force '..table.concat(iswin() and {'alias:cat', 'alias:echo', 'alias:sleep'} or {'alias:echo'}, ',')..';' -- cgit