writeTextFile: fix when executable is not a bool

(cherry picked from commit 4431bab003)
This commit is contained in:
figsoda
2023-05-29 15:48:49 -04:00
committed by Robert Hensing
parent bf31528ed1
commit 966f65b60d

View File

@@ -141,7 +141,7 @@ rec {
runCommand name
{ inherit text executable checkPhase allowSubstitutes preferLocalBuild;
passAsFile = [ "text" ];
meta = lib.optionalAttrs (executable && matches != null) {
meta = lib.optionalAttrs (toString executable != "" && matches != null) {
mainProgram = lib.head matches;
} // meta;
}