Minor refactoring of build-default-cmd