File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ elif [[ "$1" == "init-ssm" ]]; then
168168 --user-profile-name " $( _print_sm_user_profile_name) " \
169169 --output json \
170170 | tr -d " \n" )
171- execution_role=$( echo " $user_profile_json " | grep " ExecutionRole" \
171+ execution_role=$( echo " $user_profile_json " | { grep " ExecutionRole" || true ; } \
172172 | sed -e ' s/^.*"ExecutionRole": \"\([^"]*\)\".*$/\1/' )
173173
174174 SSH_SSM_ROLE=$( echo " $execution_role " | sed -e ' s/^.*:role\/\(.*\)/\1/' )
@@ -177,7 +177,7 @@ elif [[ "$1" == "init-ssm" ]]; then
177177 domain_json=$( aws sagemaker describe-domain \
178178 --domain-id " $( _print_sm_domain_id) " \
179179 | tr -d " \n" )
180- execution_role=$( echo " $domain_json " | grep " ExecutionRole" \
180+ execution_role=$( echo " $domain_json " | { grep " ExecutionRole" || true ; } \
181181 | sed -e ' s/^.*"ExecutionRole": \"\([^"]*\)\".*$/\1/' )
182182
183183 SSH_SSM_ROLE=$( echo " $execution_role " | sed -e ' s/^.*:role\/\(.*\)/\1/' )
You can’t perform that action at this time.
0 commit comments