From 0974a22834edff202646c88c7635744a4adcec13 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 28 Jun 2016 16:31:26 -0400 Subject: [PATCH] vagrant: use new 'booted' key to get current csum Closes: #360 Approved by: cgwalters --- vagrant/checkout.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vagrant/checkout.sh b/vagrant/checkout.sh index 9e75d2bf..e2397c50 100644 --- a/vagrant/checkout.sh +++ b/vagrant/checkout.sh @@ -5,7 +5,11 @@ set -euo pipefail commit=$(rpm-ostree status --json | \ python -c ' import sys, json; -print json.load(sys.stdin)["deployments"][0]["checksum"]') +deployments = json.load(sys.stdin)["deployments"] +for deployment in deployments: + if deployment["booted"]: + print deployment["checksum"] + exit()') if [[ -z $commit ]] || ! ostree rev-parse $commit; then echo "Error while determining current commit" >&2