This is the procedure we followed to build the patched versions of:
fork mvdan.cc/sh in github.com/sciabarracom/sh fork github.com/go-task/task in github.com/sciabarracom/task fork github.com/apache/openwhisk-cli in github.com/sciabarracom/openwhisk-cli fork github.com/apache/openwhisk-wskdeploy in github.com/sciabarracom/openwhisk-wskdeploy
git submodule update --init, then add remote orig-auth with an url with an authentication token so you can push it back then add remote upstream to the original repos to fetch tags then git fetch --all
execute the patch scripts in order (if you change them remember to increase version numbers)
bash patch-sh.sh bash patch-task.sh bash patch-wskdeploy.sh bash patch-wsk.sh
regenerate the go.mod/go.sum in top level (using the latest versions if you changed them!)
cd .. rm go.mod go.sum go mod init github.com/apache/openserverless-cli go get github.com/sciabarracom/openwhisk-cli@v1.2.1 go get github.com/sciabarracom/task/v3/cmd/taskmain@v3.38.10 go mod tidy go build