Skip to content

Commit

Permalink
Delay check on default manifest and image files until we know they're…
Browse files Browse the repository at this point in the history
… being used.

The default manifest.yaml and image.yaml were checked to confirm they exist before it was
even known whether they were the right files to use or not.  Move the check to occur after
we know we're not using a VARIANT that points to different files.
  • Loading branch information
Alexander, Michael authored and dustymabe committed Nov 21, 2024
1 parent 7ef008c commit 647bf16
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/cmd-init
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,6 @@ mkdir -p src
# Default paths for manifest.yaml & image.yaml
manifest="src/config/manifest.yaml"
image="src/config/image.yaml"
if [[ ! -f "${manifest}" ]] || [[ ! -f "${image}" ]]; then
echo 1>&2 "Could not find default manifests (${manifest} & ${image})"
fatal "If you are using a custom configuration, be sure it has a manifest.yaml & image.yaml."
fi

# Select the variant if requested
if [[ -n "${VARIANT}" ]] && [[ "${VARIANT}" != "default" ]]; then
Expand All @@ -197,6 +193,9 @@ if [[ -n "${VARIANT}" ]] && [[ "${VARIANT}" != "default" ]]; then
"coreos-assembler.config-variant": "${VARIANT}"
}
EOF
elif [[ ! -f "${manifest}" ]] || [[ ! -f "${image}" ]]; then
echo 1>&2 "Could not find default manifests (${manifest} & ${image})"
fatal "If you are using a custom configuration, be sure it has a manifest.yaml & image.yaml."
fi

mkdir -p cache
Expand Down

0 comments on commit 647bf16

Please sign in to comment.