diff options
author | Benjamin Drung <benjamin.drung@profitbricks.com> | 2017-05-29 13:10:41 +0300 |
---|---|---|
committer | Benjamin Drung <benjamin.drung@profitbricks.com> | 2017-05-29 13:10:41 +0300 |
commit | 31dc83f370821b320b1b40d0667cec06d6554012 (patch) | |
tree | 445fd6cc1b0138e8460e4c016bed12d48f9d4ccb | |
parent | 592dee578ce91ccfa4c25a42b709a0e8bd8b4a60 (diff) |
Fix use of uninitialized value $config{"options"}
When no options are specified for a deb line in the config (e.g. no
[arch=amd64] or similar), apt-mirror will print a warning:
Use of uninitialized value $config{"options"} in pattern match (m//) at
apt-mirror line 300, <CONFIG> line 6.
fixes #68
-rwxr-xr-x | apt-mirror | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -294,7 +294,7 @@ sub parse_config_line if ( $line =~ $pattern_deb_line ) { $config{'type'} = $+{type}; $config{'arch'} = $+{arch}; - $config{'options'} = $+{options}; + $config{'options'} = $+{options} ? $+{options} : ""; $config{'uri'} = $+{uri}; $config{'components'} = $+{components}; if ( $config{'options'} =~ /arch=((?<arch>[\w\-]+)[,]*)/g ) { |