feat: proper windows support
This commit is contained in:
@@ -2,7 +2,23 @@
|
||||
set -euo pipefail
|
||||
|
||||
script_bin="$1"
|
||||
output="$(${script_bin})"
|
||||
|
||||
run_launcher() {
|
||||
local launcher="$1"
|
||||
shift
|
||||
if [[ ${launcher} == *.cmd ]]; then
|
||||
local command
|
||||
printf -v command '"%s"' "${launcher}"
|
||||
for arg in "$@"; do
|
||||
printf -v command '%s "%s"' "${command}" "${arg}"
|
||||
done
|
||||
cmd.exe /c "${command}" | tr -d '\r'
|
||||
return 0
|
||||
fi
|
||||
"${launcher}" "$@"
|
||||
}
|
||||
|
||||
output="$(run_launcher "${script_bin}")"
|
||||
|
||||
if [[ ${output} != *"pkg-a"* ]]; then
|
||||
echo "Expected workspace run output to include pkg-a: ${output}" >&2
|
||||
|
||||
Reference in New Issue
Block a user