We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b389320 commit 3da73c6Copy full SHA for 3da73c6
ci/no-superuser/create-no-superuser-sqlserver.sh
@@ -1,5 +1,5 @@
1
#!/bin/bash
2
-set -ue
+set -u
3
4
# Get container name and password from arguments
5
SQL_SERVER_CONTAINER_NAME=$1
@@ -8,9 +8,12 @@ MAX_RETRY_COUNT=$3
8
RETRY_INTERVAL=$4
9
COUNT=0
10
11
-if [[ "$SQL_SERVER_CONTAINER_NAME" = "sqlserver22" ]]; then
+# Check if the `/opt/mssql-tools18/bin/sqlcmd` command exists or not.
12
+docker exec -t ${SQL_SERVER_CONTAINER_NAME} ls /opt/mssql-tools18/bin/sqlcmd
13
+if [[ $? -eq 0 ]]; then
14
SQLCMD=/opt/mssql-tools18/bin/sqlcmd
15
else
16
+ # If there is no `/opt/mssql-tools18/bin/sqlcmd` command, we use old command.
17
SQLCMD=/opt/mssql-tools/bin/sqlcmd
18
fi
19
0 commit comments