assignment followed by expansion of null/unset word fails assertion
Open
- Dominant language
- C
- Stars
- 531
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
command:
```sh
a=a $b
```
output:
```
mrsh: ../shell/task/simple_command.c:286: run_simple_command: Assertion `args.len > 0' failed.
fish: Job 1, './buildDir/mrsh' terminated by signal SIGABRT (Abort)
```
I think the issue is [here](https://github.com/emersion/mrsh/blob/869fba0814b0c9256de536714f8ccbcf0369b391/shell/task/simple_command.c#L241), which checks if there is a word that isn't an assignment, but this isn't correct because the word could expand to nothing.
Contributor guide
Assessment
This issue has not been assessed yet.