mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-30 06:01:19 +00:00
lib.strings.toShellVar: Use isSimpleCoercibleString
Expecting no change in behavior.
This commit is contained in:
parent
2b4a8db032
commit
03063f65a5
@ -395,7 +395,7 @@ rec {
|
||||
*/
|
||||
toShellVar = name: value:
|
||||
lib.throwIfNot (isValidPosixName name) "toShellVar: ${name} is not a valid shell variable name" (
|
||||
if isAttrs value && ! isCoercibleToString value then
|
||||
if isAttrs value && ! isSimpleCoercibleToString value then
|
||||
"declare -A ${name}=(${
|
||||
concatStringsSep " " (lib.mapAttrsToList (n: v:
|
||||
"[${escapeShellArg n}]=${escapeShellArg v}"
|
||||
|
Loading…
Reference in New Issue
Block a user