Explorar el Código

Avoid useless warning if purpose was not provided

Alois Mahdal hace 10 años
padre
commit
1cf703e750
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2
    1
      bin/mkexec

+ 2
- 1
bin/mkexec Ver fichero

@@ -70,7 +70,8 @@ $cmds->{vim}->{run}     = "vim +\"normal G\$\" '%s'";
70 70
 $cmds->{editor}->{test} = "editor --version 2>/dev/null";
71 71
 $cmds->{editor}->{run}  = "editor '%s'";
72 72
 
73
-unless (exists $templates->{$type}->{$purpose}) {
73
+unless ($purpose eq ""
74
+        or exists $templates->{$type}->{$purpose}) {
74 75
     warn "undefined purpose '$purpose' for type '$type'\n";
75 76
     $purpose = "";
76 77
 }