Add defaultPath to configure response (#4)
This commit is contained in:
@@ -98,6 +98,7 @@ is alive, determine the version at startup, and provide per-store defaults.
|
||||
“status”: “ok”,
|
||||
“version”: <int>
|
||||
“response”: {
|
||||
"defaultPath": "/path/to/default/store",
|
||||
“storeSettings”: {
|
||||
“storeName”: <raw contents of storePath/.browserpass.json>
|
||||
}
|
||||
|
@@ -93,7 +93,9 @@ function configure()
|
||||
fi
|
||||
done
|
||||
|
||||
OUTPUT='{}'
|
||||
[ -n "$PASSWORD_STORE_DIR" ] || PASSWORD_STORE_DIR="~/.password-store"
|
||||
OUTPUT="$(jq -n --arg defaultPath "$PASSWORD_STORE_DIR" '.defaultPath = $defaultPath')"
|
||||
|
||||
for STORE in "${!STORES[@]}"; do
|
||||
OUTPUT=$(jq --arg store "$STORE" --arg settings "${STORES[$STORE]}" '.storeSettings[$store] = $settings' <<< "$OUTPUT")
|
||||
done
|
||||
|
Reference in New Issue
Block a user