Merge pull request #128550 from yu-re-ka/feature/revert-allow-string-paths

Revert "writers: Allow string paths"
This commit is contained in:
Silvan Mosberger 2021-06-28 23:02:28 +02:00 committed by GitHub
commit e16f96df11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,12 +15,12 @@ rec {
name = last (builtins.split "/" nameOrPath);
in
pkgs.runCommandLocal name (if types.path.check content then {
inherit interpreter;
contentPath = content;
} else {
pkgs.runCommandLocal name (if (types.str.check content) then {
inherit content interpreter;
passAsFile = [ "content" ];
} else {
inherit interpreter;
contentPath = content;
}) ''
# On darwin a script cannot be used as an interpreter in a shebang but
# there doesn't seem to be a limit to the size of shebang and multiple