Skip to content

Commit 728d0fd

Browse files
#71 - Fix instance fetching logic
1 parent 07fe09a commit 728d0fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sagemaker_ssh_helper/sm-local-start-ssh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fi
4343
INSTANCE_ID=$1
4444
shift
4545

46-
INSTANCE_ID=$(echo "$INSTANCE_ID" | tr '\n' ' ' | grep -o 'mi-.*$' | tr -d ' ')
46+
INSTANCE_ID=$(echo "$INSTANCE_ID" | tr '\n' ' ' | tr -d ' ' | grep -oe 'mi-[0-9a-f]*$')
4747

4848
if [ -z "${INSTANCE_ID}" ]; then
4949
echo "INSTANCE_ID is not provided or incorrect (should be in the form mi-1234567890abcdef0)"

0 commit comments

Comments
 (0)