Skip to content

Commit 2664ba8

Browse files
jps-helpjamesps-ebi
authored andcommitted
Fix logic
1 parent b1d1a97 commit 2664ba8

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

manifests/source.pp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,8 @@
343343
if (type($release) =~ String) {
344344
warning("For deb822 sources, 'release' must be specified as an array. Converting to array.")
345345
$_release = [$release]
346+
} else {
347+
$_release = $release
346348
}
347349
}
348350

@@ -353,14 +355,17 @@
353355
$_repos = $repos
354356
}
355357

356-
if (type($architecture =~ String)) {
357-
warning("For deb822 sources, 'architecture' must be specified as an array. Converting to array.")
358-
$_architecture = split($architecture, '[,]')
359-
}
360-
else {
358+
if $architecture != undef {
359+
if (type($architecture =~ String)) {
360+
warning("For deb822 sources, 'architecture' must be specified as an array. Converting to array.")
361+
$_architecture = split($architecture, '[,]')
362+
}
363+
else {
364+
$_architecture = $architecture
365+
}
366+
} else {
361367
$_architecture = $architecture
362368
}
363-
364369
case $ensure {
365370
'present': {
366371
$header = epp('apt/_header.epp')

0 commit comments

Comments
 (0)