writeTextFile: fix when executable is not a bool

This commit is contained in:
figsoda 2023-05-29 15:48:49 -04:00
parent 300dbaff42
commit 4431bab003

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