There is no -g option for the set command in Bash 5.1 on mac:

This is what worked for me when executing from the bash script:
cmd=$(weep export arn:aws:iam::123:/aaa/sss)
cmd=${cmd//"set -gx"/"export"}
cmd=${cmd//" \""/=\"}
eval $cmdAs you see, I changed the output to:
format. It would be great if we could get such output as well.