Skip to content

Commit 647bf16

Browse files
Delay check on default manifest and image files until we know they're 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.
1 parent 7ef008c commit 647bf16

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/cmd-init

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,6 @@ mkdir -p src
179179
# Default paths for manifest.yaml & image.yaml
180180
manifest="src/config/manifest.yaml"
181181
image="src/config/image.yaml"
182-
if [[ ! -f "${manifest}" ]] || [[ ! -f "${image}" ]]; then
183-
echo 1>&2 "Could not find default manifests (${manifest} & ${image})"
184-
fatal "If you are using a custom configuration, be sure it has a manifest.yaml & image.yaml."
185-
fi
186182

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

202201
mkdir -p cache

0 commit comments

Comments
 (0)