From 0334d4a65659c08a9ecbb6bdd781acb1bcac0741 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Mon, 12 Jun 2023 12:15:14 -0400 Subject: [PATCH] cmd-init: use sudo when creating src/config.json When following the steps for building SCOS I ran `cosa init --variant scos https://github.com/openshift/os.git` and got a failure. Let's run this with `sudo` if we have the privileges to do so. --- src/cmd-init | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/cmd-init b/src/cmd-init index 38a6804920..f94fe8b15b 100755 --- a/src/cmd-init +++ b/src/cmd-init @@ -192,7 +192,14 @@ if [[ -n "${VARIANT}" ]] && [[ "${VARIANT}" != "default" ]]; then fatal "Could not find the manifests (${manifest} & ${image}) for the '${VARIANT}' variant" fi echo "Using variant: '${VARIANT}'" - cat > "src/config.json" <