PowerShell wrapper breaks some common GNU command forms
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- powershell, rust
- Área
- cli, operating-systems
Línea de trabajo
Comienza reproduciendo los casos de cat -- -dash.txt, grep y cp con el código fuente del wrapper de PowerShell en el commit fe33724; después, compara su gestión de argumentos con el artefacto de la release. Comprueba si el wrapper puede conservar el caso del nombre de archivo -- e identifica qué otras formas de GNU/POSIX son limitaciones de la sintaxis del shell; el trabajo debe incluir un fix verificado o documentación explícita del wrapper.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
With the PowerShell wrapper enabled, I still hit a few GNU command lines that behave in surprising ways.
The clearest one is a filename starting with -:
Set-Content -LiteralPath '-dash.txt' -Value 'dash file foo'
cat -- -dash.txt
Expected:
dash file foo
Actual:
cat.cmd: '-dash': The system cannot find the file specified.
cat: .txt: The system cannot find the file specified.
It looks like -dash.txt is getting split into -dash and .txt. The same shape also fails for me with:
grep foo -- -dash.txt
cp -- -dash.txt dash-copy.txt
This workaround does work:
cat -- .\-dash.txt
grep foo -- .\-dash.txt
cp -- .\-dash.txt dash-copy.txt
I also ran into a few common GNU/POSIX forms that do not survive the wrapper:
find . \( -name "*.txt" -o -name "*.log" \) -print
find . -name "*.txt" -exec grep foo {} \;
[ -f a.txt ]
cat space\ name.txt
ls \[ab\].txt
Some of these are clearly PowerShell-vs-POSIX-shell syntax issues, so I am not claiming they are all coreutils bugs. But they are common command lines from GNU docs / muscle memory, and they are exactly the kind of cases users will try when using this project.
It would be useful either to handle the cases that can be handled, or to document the boundary of the PowerShell wrapper more explicitly. The -- -dash.txt case in particular looks like an argument-passing bug rather than just a POSIX shell compatibility limitation.
Environment:
- Windows 10.0.26200
- PowerShell 7.5.5
- Wrapper source tested from commit
fe33724 - Release artifact tested:
coreutils-2026.5.29-x64.exe - SHA256:
23B019D0664F1F5AA2A0C503435F8B52D3C8EEA2AEC1C0609CE21FCE18667281
- Lenguaje dominante
- Rust
- Estrellas
- 5.2k
- Forks
- 107
- Merge medio
- 2 d 19 h
- PR fusionados (30 d)
- 4
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/coreutils
-
Add support for /dev/null Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
sleep has 9MB Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
grep not work Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
-
xargs: Error: Command could not be run: The filename or extension is too long. (os error 206) Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
Todos los issues de microsoft/coreutils
Issues similares
-
bug github_actions
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
registrystack/registry-stack#1393 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
rocky-data/rocky#2181 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Abiertobot:ai-assisted component:indexer QA-roadmap status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
midnightntwrk/midnight-indexer#1557 ·