3
0
mirror of https://git.launchpad.net/livecd-rootfs synced 2025-04-07 08:13:37 +00:00

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
This commit is contained in:
Robert C Jennings 2018-04-10 10:09:26 -05:00
parent 0dbaf4cc9d
commit cbcb5d3ed8

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