Browse Source

Avoid useless warning if purpose was not provided

Alois Mahdal 10 years ago
parent
commit
1cf703e750
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      bin/mkexec

+ 2
- 1
bin/mkexec View File

@@ -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
 }