From 55c1077bc19f5cf5b59ab74d1b6f9daa2d1fbed0 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 25 Nov 2014 09:15:50 +0000 Subject: Ensure we're in the advisory dir before running svn commands. --- lib/MGA/Advisories.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/MGA') diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm index d29d706..2d84aac 100644 --- a/lib/MGA/Advisories.pm +++ b/lib/MGA/Advisories.pm @@ -197,7 +197,8 @@ sub next_id { sub assign_id { my ($advname) = @_; - my $advfile = "$config->{advisories_dir}/$advname.adv"; + chdir($config->{advisories_dir}); + my $advfile = "$advname.adv"; $advfile =~ s/\.adv\.adv$/.adv/; if ( ! -f $advfile ) { @@ -412,7 +413,7 @@ sub assign_id { } } $message .= ': '.join(', ', @pkgs); - $exitstatus = system(('svn', 'commit', '-q', '-m', $message, $advfile)); + $exitstatus = system('svn', 'commit', '-q', '-m', $message, $advfile); if (0 == $exitstatus) { print "✔\n"; } else { @@ -421,6 +422,7 @@ sub assign_id { } sub assign_ids { + chdir($config->{advisories_dir}); # Ensure users local repo is up to date my $exitstatus = system("svn up"); if ( 0 != $exitstatus ) { -- cgit v1.2.1