When you run the cobra-cli init command without connecting to the internet first, the program exits with a Error: exit status 1 and no further information supplied. My suggestion: Terminate execution early and tell the user a network connection is required.