sg setup - Error with gcloud setup
Created by: burmudar
https://github.com/sourcegraph/sourcegraph/discussions/37773
Discussed inOriginally posted by lrhacker June 27, 2022 The automatic fix for adding gcloud during new laptop setup didn't work. It failed with exit code 6 and no other message except for printing the script that (I assume) it was trying to run:
URL=https://dl.google.com/dl/cloudsdk/channels/rapid/install_google_cloud_sdk.bash
function download {
scratch="$(mktemp -d -t tmp.XXXXXXXXXX)" || exit
script_file="$scratch/install_google_cloud_sdk.bash"
echo "Downloading Google Cloud SDK install script: $URL"
curl -# "$URL" > "$script_file" || exit
chmod 775 "$script_file"
echo "Running install script from: $script_file"
"$script_file" "$@"
}
download "$@"
Copying and pasting that script running it without any modification worked, so I'm not sure where the problem was. Thankfully, that also meant it was quick to fix and keep going with my setup process.
sg
information
Commit: b066ce989003f44d446c9dc752f562ebb2db1af3
Command: sg setup
Flags: ``