For any bash script on my macOS computer adding the --login argument to the any shebang, i.e. #!/bin/bash --login makes the script stall and never complete. For example, the simple script
#!/bin/bash --login
echo "hello"
will never exit. But remove --login argument from the shebang and it will exit as normal. Can someone please explain to me why this happens?