Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Bash: an assignment in a loop body that reads the loop variable is not listed on later commands

Aberta
#249 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
bash, csharp
Domínio
devtools

Direção de pesquisa

The issue names no source files or tests; start by locating how SST records assignment facts for commands inside Bash loop bodies, then trace the handling of assignments that read the loop variable. Add or find coverage for the provided for loop example and verify later git status occurrences list the assignment with a proven value or Unknown, while MayAffectProcessEnvironment remains true unless the complete-environment rule proves otherwise.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

bug

Problem

An assignment inside a loop body that reads the loop variable does not appear in the assignment facts of the later commands in that body.

Example:

for i in 1 2; do GIT_DIR=/tmp/r$i; git status; done
  • If GIT_DIR is in the launch environment, git status runs with GIT_DIR=/tmp/r1 and then with GIT_DIR=/tmp/r2.
  • SST does not list the GIT_DIR assignment on the git status occurrence.

Impact

A consumer that reads the assignment facts (for example, an approval digest) does not see that the environment of git status can change.

Expected

Found by the review of https://github.com/Aaronontheweb/ShellSyntaxTree/pull/248 (dev has the same gap).

Linguagem predominante
C#
Estrelas
15
Forks
0
Merge médio
9h 8min
PRs com merge (30d)
46

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Aaronontheweb/ShellSyntaxTree

Todas as issues de Aaronontheweb/ShellSyntaxTree

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.