Add -LiteralPath parameter to Start-ThreadJob for cross-platform path handling
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 56/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- powershell
- Área
- cli
Línea de trabajo
Start with src/code/Microsoft.PowerShell.ThreadJob.cs, especially the GetScriptBlockFromFile method linked in the issue, and trace how -FilePath parameter sets are declared. Compare the parameter sets and aliases with Start-Job, then inspect or run the existing Start-ThreadJob tests for file paths. Done means -LiteralPath, -PSPath, and -LP accept wildcard characters literally and cannot be combined with -FilePath.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary of the new feature / enhancement
Summary
Start-ThreadJob should support -LiteralPath parameter (with -PSPath and -LP aliases) to match Start-Job's functionality and handle cross-platform file paths that may contain wildcard characters.
Problem
PowerShell is now cross-platform, and characters traditionally used as wildcards (*, ?, [, ]) may be present in filenames on non-Windows systems (e.g., Linux, macOS). Currently, Start-ThreadJob only has a -FilePath parameter, which may cause issues when:
- A legitimate filename contains wildcard characters on Unix-like systems
- Users need to ensure paths are interpreted literally without pattern matching
- Users want API consistency between
Start-JobandStart-ThreadJob
Current Behavior
Start-ThreadJob only supports:
Start-ThreadJob -FilePath "path/to/script.ps1"
The -FilePath parameter rejects paths with wildcard characters (see GetScriptBlockFromFile method):
if (WildcardPattern.ContainsWildcardCharacters(filePath))
{
throw new ArgumentException("FilePath cannot contain wildcards.");
}
Proposed technical implementation details (optional)
Proposed Solution
Add a -LiteralPath parameter to Start-ThreadJob with:
- Aliases:
-PSPath,-LP(matchingStart-Job) - Behavior: Interprets paths literally without wildcard evaluation
- Mutual exclusivity:
-FilePathand-LiteralPathshould be in different parameter sets
Example usage:
# For a file literally named "test[1].ps1" on Linux
Start-ThreadJob -LiteralPath "/home/user/scripts/test[1].ps1"
# With aliases
Start-ThreadJob -PSPath "/home/user/scripts/test[1].ps1"
Start-ThreadJob -LP "/home/user/scripts/test[1].ps1"
- Lenguaje dominante
- PowerShell
- Estrellas
- 37
- Forks
- 22
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la 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 PowerShell/ThreadJob
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
PowerShell/ThreadJob#59 · 1 reacción ·
-
Set alias for ThreadJob command(s)Posiblemente ocupada @kilasuit la tomó hace 80 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 20/100
PowerShell/ThreadJob#45 · 1 comentario ·
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 48/100
PowerShell/ThreadJob#44 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
PowerShell/ThreadJob#43 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
PowerShell/ThreadJob#40 · 5 reacciones ·
Todos los issues de PowerShell/ThreadJob
Issues similares
-
untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dotnet/install-scripts#746 · 1 reacción ·
-
area:plugins area:tui enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
anthropics/claude-code#105139 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
zilliztech/memsearch#818 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ehmpathy/rhachet-roles-bhuild#616 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día