From b8c61a14bcaa62fb174d46331d8c883f574b0f2a Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Wed, 13 Oct 2021 11:37:28 +0300 Subject: [PATCH] utils: silently ignore records that would violate (#4267) --- images/macos/provision/utils/utils.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/macos/provision/utils/utils.sh b/images/macos/provision/utils/utils.sh index c4acb551d..090fa60e3 100755 --- a/images/macos/provision/utils/utils.sh +++ b/images/macos/provision/utils/utils.sh @@ -196,7 +196,7 @@ configure_system_tccdb () { local values=$1 local dbPath="/Library/Application Support/com.apple.TCC/TCC.db" - local sqlQuery="INSERT INTO access VALUES($values);" + local sqlQuery="INSERT OR IGNORE INTO access VALUES($values);" sudo sqlite3 "$dbPath" "$sqlQuery" } @@ -204,6 +204,6 @@ configure_user_tccdb () { local values=$1 local dbPath="$HOME/Library/Application Support/com.apple.TCC/TCC.db" - local sqlQuery="INSERT INTO access VALUES($values);" + local sqlQuery="INSERT OR IGNORE INTO access VALUES($values);" sqlite3 "$dbPath" "$sqlQuery" }