live-build/functions: reduce scope of snap account variable

* Only shell out to set $account when we need to use it.
* Reduce scope of $account to make it local to the function
* Fix indenting within an 'if' block
ubuntu/cosmic
Robert C Jennings 7 years ago
parent 0dbaf4cc9d
commit cbcb5d3ed8

@ -425,11 +425,11 @@ snap_prepare() {
> "$account_key_assertion" > "$account_key_assertion"
fi fi
account=$(sed -n -e's/account-id: //p' < "$account_key_assertion")
if ! [ -e "$account_assertion" ] ; then if ! [ -e "$account_assertion" ] ; then
snap known --remote account account-id=$account \ local account=$(sed -n -e's/account-id: //p' < "$account_key_assertion")
> "$account_assertion" snap known --remote account account-id=$account \
> "$account_assertion"
fi fi
# Download the core snap # Download the core snap

Loading…
Cancel
Save