Skip to content

Commit

Permalink
Merge pull request #249 from aws-samples/pcluster-fetch-config
Browse files Browse the repository at this point in the history
pcluster-fetch-config: show error messages
  • Loading branch information
verdimrc authored Apr 19, 2024
2 parents 0042c47 + cd4e00a commit 6f05309
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ parse_args() {

parse_args $@

cluster_config_url=$(pcluster describe-cluster -n $cluster_name "${pcluster_args[@]}" | jq -r .clusterConfiguration.url)
pcluster_response=$(pcluster describe-cluster -n $cluster_name "${pcluster_args[@]}" || true)
cluster_config_url=$(echo "$pcluster_response" | jq -r .clusterConfiguration.url)
[[ "$cluster_config_url" == "null" ]] && { echo "${pcluster_response}" | jq . ; exit 1 ; }
cluster_config=$(curl --silent "$cluster_config_url")

# By default, auto-detect the syntax highlighter
Expand Down

0 comments on commit 6f05309

Please sign in to comment.