@@ -249,7 +249,7 @@ func GetContainerNamePrefixForImage(image string) (string, error) {
249
249
}
250
250
251
251
func getDefaultImageForDistro (distro , release string ) string {
252
- if _ , supportedDistro := supportedDistros [ distro ]; ! supportedDistro {
252
+ if ! IsDistroSupported ( distro ) {
253
253
distro = "fedora"
254
254
}
255
255
@@ -643,13 +643,10 @@ func ShortID(id string) string {
643
643
// 'general.distro' key in a config file or 'fedora') is assumed.
644
644
func ParseRelease (distro , release string ) (string , error ) {
645
645
if distro == "" {
646
- distro = distroDefault
647
- if viper .IsSet ("general.distro" ) {
648
- distro = viper .GetString ("general.distro" )
649
- }
646
+ distro , _ = ResolveDistro (distro )
650
647
}
651
648
652
- if _ , supportedDistro := supportedDistros [ distro ]; ! supportedDistro {
649
+ if ! IsDistroSupported ( distro ) {
653
650
distro = "fedora"
654
651
}
655
652
@@ -796,10 +793,7 @@ func ResolveImageName(distroCLI, imageCLI, releaseCLI string) (string, string, e
796
793
distro , image , release := distroCLI , imageCLI , releaseCLI
797
794
798
795
if distroCLI == "" {
799
- distro = distroDefault
800
- if viper .IsSet ("general.distro" ) {
801
- distro = viper .GetString ("general.distro" )
802
- }
796
+ distro , _ = ResolveDistro (distroCLI )
803
797
}
804
798
805
799
if distro != distroDefault && releaseCLI == "" && ! viper .IsSet ("general.release" ) {
0 commit comments