Page MenuHomePhabricator

D11310.id38029.diff
No OneTemporary

D11310.id38029.diff

diff --git a/nix/dev-shell.nix b/nix/dev-shell.nix
--- a/nix/dev-shell.nix
+++ b/nix/dev-shell.nix
@@ -154,6 +154,8 @@
# Provide decent bash prompt
source "${better-prompt}/bin/better-prompt"
+ $PRJ_ROOT/scripts/set-up-authoritative-keyserver.sh
+
echo "Welcome to Comm dev environment! :)"
'';
}
diff --git a/scripts/set-up-authoritative-keyserver.sh b/scripts/set-up-authoritative-keyserver.sh
--- a/scripts/set-up-authoritative-keyserver.sh
+++ b/scripts/set-up-authoritative-keyserver.sh
@@ -5,7 +5,7 @@
user_credentials_file="$PRJ_ROOT/keyserver/secrets/user_credentials.json"
set_up_or_abort() {
- read -r -p "Do you want to set up a new authoritative keyserver? (y/N) " user_input
+ read -t 60 -r -p "Do you want to set up a new authoritative keyserver? (y/N) " user_input
if [[ $user_input != "Y" && $user_input != "y" ]]; then
exit 1
@@ -35,6 +35,10 @@
node "$PRJ_ROOT"/scripts/set-user-credentials.js "$PRJ_ROOT"
}
+if [[ -n "$BUILDKITE" || -n "$GITHUB_ACTIONS" ]]; then
+ exit
+fi
+
if grep -q '"usingIdentityCredentials":.*true' "$user_credentials_file"; then
if ! (mysql -u "$USER" -Bse "USE comm; SELECT * FROM metadata" 2>/dev/null | grep "db_version">/dev/null); then
echo -e "'usingIdentityCredentials' is set to true, but the database is not set up.\n" \

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 10:19 PM (20 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2532091
Default Alt Text
D11310.id38029.diff (1 KB)

Event Timeline