treefmt.withConfig: prevent an empty path segment in PATH when config.runtimeInputs is empty
This commit is contained in:
committed by
Thomas Gerbet
parent
12ed470109
commit
0b73a970af
@@ -31,10 +31,15 @@
|
||||
wrapper = finalAttrs.finalPackage;
|
||||
};
|
||||
};
|
||||
postBuild = ''
|
||||
wrapProgram "$out/bin/treefmt" \
|
||||
--prefix PATH : "$binPath" \
|
||||
--add-flags "--config-file $configFile"
|
||||
'';
|
||||
postBuild =
|
||||
let
|
||||
wrapPrefixPathArgument = lib.optionalString (
|
||||
config.runtimeInputs != [ ]
|
||||
) "--prefix PATH : \"$binPath\"";
|
||||
in
|
||||
''
|
||||
wrapProgram "$out/bin/treefmt" \
|
||||
--add-flags "--config-file $configFile " ${wrapPrefixPathArgument}
|
||||
'';
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user