Skip to content

Commit 24e8a61

Browse files
committed
trim metadata url
1 parent 997653b commit 24e8a61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hardware/hardware.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ if [[ "$AWS_HTTP_CODE" == "200" ]]; then
138138
exit 0
139139
fi
140140

141-
GCP_HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 1 -H "Metadata-Flavor: Google" 'http://metadata.google.internal/computeMetadata/v1/instance/')
141+
GCP_HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 1 -H "Metadata-Flavor: Google" 'http://metadata.google.internal/computeMetadata/v1/')
142142
if [[ "$GCP_HTTP_CODE" == "200" ]]; then
143143
GCP_INSTANCE_TYPE=$(curl -s --connect-timeout 1 -H "Metadata-Flavor: Google" 'http://metadata.google.internal/computeMetadata/v1/instance/machine-type' | awk -F/ '{print $NF}')
144144
echo "$GCP_INSTANCE_TYPE" > instance.txt

0 commit comments

Comments
 (0)