Martijn Laan 5 月之前
父節點
當前提交
37a2467326
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      Projects/ISSigTool.dpr

+ 6 - 6
Projects/ISSigTool.dpr

@@ -187,9 +187,6 @@ end;
 
 procedure Go;
 begin
-  if KeyFilename = '' then
-    KeyFilename := GetEnv('ISSIGTOOL_KEY_FILE');
-
   const ArgList = TStringList.Create;
   try
     for var I := 1 to NewParamCount do
@@ -215,9 +212,12 @@ begin
     const Command = ArgList[0];
     ArgList.Delete(0);
 
-    if KeyFilename = '' then
-      RaiseFatalError('"--key-file=" option must be specified, ' +
-        'or set the ISSIGTOOL_KEY_FILE environment variable');
+    if KeyFilename = '' then begin
+      KeyFilename := GetEnv('ISSIGTOOL_KEY_FILE');
+      if KeyFilename = '' then
+        RaiseFatalError('"--key-file=" option must be specified, ' +
+          'or set the ISSIGTOOL_KEY_FILE environment variable');
+    end;
 
     if Command = 'generate-private-key' then begin
       if ArgList.Count <> 0 then