On Mon Feb 10, 2025 at 10:08 PM CET, Harald van Dijk wrote:
> Hi,
>
> On 10/02/2025 19:14, Sertonix wrote:
>> The test-test example in the comment wasn't actually fixed before as
>> one can see by running
>> env -i "test-test=test" busybox ash -c 'export -p'
>>
>> This previously incorrectly resulted in
>> export test
>
> You're right that that output is incorrect. However...
>
>> But now it correctly results in
>> export 'test-test=test'
>
> ...this is not the correct result either. As the comment in the code
> says, the output is meant to be usable for 'eval'. This output is not
> usable for 'eval' and would result in a "bad variable name" error.
This is not the case. I changed the variable name checking to be more
relaxed for export so it works as expected. You can try this to verify:
env -i "test-test=test" busybox ash -c 'eval "$(export -p)"'
> The variable needs to be skipped when printing instead.
>
> Cheers,
> Harald van Dijk
_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox