Unverified Commit e0ce766f authored by Philip Taron's avatar Philip Taron
Browse files

symlinkJoin: use targeted pos for pname/name

Use the more precise pos computation that specifically targets pname or
name, rather than the generic approach inherited from runCommandWith
that uses the alphabetically-first attribute. Since one of pname or name
is always required, this reliably points to the call site.
parent 48de4509
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -636,13 +636,10 @@ rec {
      }
      // lib.optionalAttrs (!args ? meta) {
        pos =
          let
            argNames = builtins.attrNames args;
          in
          if builtins.length argNames > 0 then
            builtins.unsafeGetAttrPos (builtins.head argNames) args
          if args ? pname then
            builtins.unsafeGetAttrPos "pname" args
          else
            null;
            builtins.unsafeGetAttrPos "name" args;
      };
  };