cmdlib: forbid overlay when building, not preflight
Using `cosa init` on overlay should be fine. You may just be
initializing to use e.g. `cosa buildfetch`.
Move the overlay check to build time instead.
@@ -99,10 +99,6 @@ depcheck() {
preflight() {
depcheck
- if [ "$(stat -f --printf="%T" .)" = "overlayfs" ] && [ -z "${COSA_SKIP_OVERLAY:-}" ]; then
- fatal "$(pwd) must be a volume"
- fi
-
# See https://pagure.io/centos-infra/issue/48
if test "$(umask)" = 0000; then
fatal "Your umask is unset, please use umask 0022 or so"
@@ -157,6 +153,10 @@ prepare_build() {
fatal "No $(pwd)/builds found; did you run coreos-assembler init?"
fi
+ if [ "$(stat -f --printf="%T" .)" = "overlayfs" ] && [ -z "${COSA_SKIP_OVERLAY:-}" ]; then
+ fatal "$(pwd) must be a volume"
+ fi
+
workdir="$(pwd)"
# Be nice to people who have older versions that
