I came across this answer while researching this issue and I can get the script to run. But I have no idea how to pass arguments to my script (It's expecting 4 arguments).
I also need to capture its output as it emits a list of HEX color codes on completion.
Is this possible?
This is what I have:
# Using -Raw, read the file in full, as a single, multi-line string.
$DcolorsScript = Get-Content -Raw ./shellscripts/dcolors.sh
# !! The \-escaping is needed up to PowerShell 7.2.x
wsl bash -c ($DcolorsScript -replace '"', '\"')