On WSL (opensuse Leap 42.3), I encountered a bug like this:
$ echo "$*" | sed "s $HOME ~ g"
-bash: child setpgid (236 to 235): Operation not permitted
This is not the case on the default Leap 42.3, I suspect that this is a bug of WSL(opensuse Leap 42.3). I am using Windows10 Pro 64bit.