Skip to content

Commit a14262b

Browse files
committed
(CONT-493) PPA validation adjustment
Prior to this commit, one of our updates (#1052) implemented a regex validation for ppa packages that were to be installed. However, this validation did not account for resource names that were dotted. This commit aims to fix this bug in our validation process so that it works as intended.
1 parent f12c74c commit a14262b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

manifests/ppa.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}
4141

4242
# Validate the resource name
43-
if $name !~ /^ppa:([a-zA-Z0-9\-_]+)\/([a-zA-z0-9\-_\.]+)$/ {
43+
if $name !~ /^ppa:([a-zA-Z0-9\-_.]+)\/([a-zA-z0-9\-_\.]+)$/ {
4444
fail("Invalid PPA name: ${name}")
4545
}
4646

spec/defines/ppa_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def ppa_exec_params(user, repo, distro = 'trusty', environment = [])
7878
[
7979
'ppa:foo!/bar',
8080
'ppa:foo/bar!',
81-
'ppa:foo1.0/bar',
81+
'ppa:foo1,0/bar',
8282
'ppa:foo/bar/foobar',
8383
'|| ls -la ||',
8484
'|| touch /tmp/foo.txt ||',

0 commit comments

Comments
 (0)