about summary refs log tree commit diff
path: root/external
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-15T15·57+0000
committerVincent Ambo <tazjin@google.com>2019-12-15T15·57+0000
commit53630e3b1544de38f509e48ac0f589bcfafa7728 (patch)
tree227a3827af7048e81b9ba45d32041fab8a6a36d3 /external
parent7f74980457df843aea542510a406f34366e8b868 (diff)
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.
Diffstat (limited to 'external')
-rw-r--r--external/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/external/default.nix b/external/default.nix
index ee0bf94fa2c7..6e1dce11140b 100644
--- a/external/default.nix
+++ b/external/default.nix
@@ -71,7 +71,7 @@ let
       };
 
       binArgs = args // {
-        name = last ([ path ] ++ entry.locator);
+        name = (last ((lib.splitString "/" path) ++ entry.locator));
       };
     in if entry.isCommand then (program binArgs) else (package libArgs);