lib.strings.toShellVar: Use isSimpleCoercibleString
Expecting no change in behavior.
This commit is contained in:
@@ -395,7 +395,7 @@ rec {
|
|||||||
*/
|
*/
|
||||||
toShellVar = name: value:
|
toShellVar = name: value:
|
||||||
lib.throwIfNot (isValidPosixName name) "toShellVar: ${name} is not a valid shell variable name" (
|
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}=(${
|
"declare -A ${name}=(${
|
||||||
concatStringsSep " " (lib.mapAttrsToList (n: v:
|
concatStringsSep " " (lib.mapAttrsToList (n: v:
|
||||||
"[${escapeShellArg n}]=${escapeShellArg v}"
|
"[${escapeShellArg n}]=${escapeShellArg v}"
|
||||||
|
|||||||
Reference in New Issue
Block a user