Skip to content

Commit

Permalink
Fixed a bug in FAPatch where setting the option Quiet to
Browse files Browse the repository at this point in the history
True did not suppress the ChoiceDialog.
  • Loading branch information
vsht committed Feb 27, 2022
1 parent 5b0d820 commit 93bf601
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions FeynCalc/Feynman/FAPatch.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,35 @@

(*
This software is covered by the GNU General Public License 3.
Copyright (C) 1990-2020 Rolf Mertig
Copyright (C) 1997-2020 Frederik Orellana
Copyright (C) 2014-2020 Vladyslav Shtabovenko
Copyright (C) 1990-2021 Rolf Mertig
Copyright (C) 1997-2021 Frederik Orellana
Copyright (C) 2014-2021 Vladyslav Shtabovenko
*)

(* :Summary: Patch for FeynArts *)

(* ------------------------------------------------------------------------ *)

FAPatch::usage =
"FAPatch[] is an auxiliary function that patches FeynArts to be compatible \
with FeynCalc. If an unpatched copy of FeynArts is present in $FeynArtsDirectory, \
"FAPatch[] is an auxiliary function that patches FeynArts to be compatible with
FeynCalc.If an unpatched copy of FeynArts is present in $FeynArtsDirectory,
evaluating FAPatch[] will start the patching process.";

PatchModelsOnly::usage =
"PatchModelsOnly is an Option of FAPatch. When set to True, FAPatch will patch \
only the model files in the Models directory of the FeynArts installation. This \
is useful when you have added new custom models, e.g. generated by FeynRules.";
"PatchModelsOnly is an option of FAPatch. When set to True, FAPatch will patch
only the model files in the \"Models\" directory of the FeynArts installation.
This is useful when you have added new custom models, e.g. generated by
FeynRules.";

FAModelsDirectory::usage =
"FAModelsDirectory is an Option of FAPatch. It points to the directory \
that contains FeynArts models. The default value is ``Models'' inside \
$FeynArtsDirectory.";
"FAModelsDirectory is an option of FAPatch. It points to the directory that
contains FeynArts models. The default value is \"Models\"' inside
$FeynArtsDirectory'.";

FCFilePatch::usage =
"FCFilePatch[input,output, rp] replaces the patterns given by rp in the file input \
and writes the modified version to output. rp should be a list of the form \
{string -> string, ..}.";
"FCFilePatch[input,output, rp] replaces the patterns given by rp in the file
input and writes the modified version to output. Here rp should be a list of
the form {string -> string, ...}.";

FAPatch::incomplete =
"Your installation of FeynArts appears to be incomplete. Patching aborted.";
Expand Down Expand Up @@ -169,7 +170,7 @@
filenames
];
nmodels=0;
If[ !OptionValue[PatchModelsOnly] || OptionValue[Quiet],
If[ !(OptionValue[PatchModelsOnly] || OptionValue[Quiet]),

If[ ChoiceDialog["An installation of FeynArts has been found in \"" <> $FeynArtsDirectory <>
"\". This program will now patch FeynArts to allow interoperation with FeynCalc. Continue?",
Expand All @@ -185,8 +186,9 @@


Map[FCFilePatch[#, #, repList] &, allfiles];
If[ nmodels=!=0,
FCPrint[0, "Patched " <> ToString[nmodels] <> " FeynArts models.\n", UseWriteString -> True];
If[ nmodels=!=0 && !OptionValue[Quiet],
FCPrint[0, "Patched " <> ToString[nmodels] <> " FeynArts models.\n", UseWriteString -> True],
FCPrint[0, "Successfully patched FeynArts.\n", UseWriteString -> True];
]

];
Expand Down

0 comments on commit 93bf601

Please sign in to comment.