fix(external): Correctly determine binary name if locator is empty

If the root of a project is a binary, the previous logic would
generate invalid names.

This ensure that the last path component of the name is used.
This commit is contained in:
Vincent Ambo 2019-12-15 15:57:10 +00:00
parent 7f74980457
commit 53630e3b15

View file

@ -71,7 +71,7 @@ let
}; };
binArgs = args // { binArgs = args // {
name = last ([ path ] ++ entry.locator); name = (last ((lib.splitString "/" path) ++ entry.locator));
}; };
in if entry.isCommand then (program binArgs) else (package libArgs); in if entry.isCommand then (program binArgs) else (package libArgs);