Add -LiteralPath parameter to Start-ThreadJob for cross-platform path handling
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 56/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Estagnada
- Stack de tecnologia
- powershell
- Domínio
- cli
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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"
- Linguagem predominante
- PowerShell
- Estrelas
- 37
- Forks
- 22
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de PowerShell/ThreadJob
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
PowerShell/ThreadJob#59 · 1 reação ·
-
Set alias for ThreadJob command(s)Talvez já em andamento @kilasuit assumiu há 80 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 20/100
PowerShell/ThreadJob#45 · 1 comentário ·
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 48/100
PowerShell/ThreadJob#44 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
PowerShell/ThreadJob#43 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
PowerShell/ThreadJob#40 · 5 reações ·
Todas as issues de PowerShell/ThreadJob
Issues semelhantes
-
untriaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
dotnet/install-scripts#746 · 1 reação ·
-
area:plugins area:tui enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 69/100
anthropics/claude-code#105139 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
zilliztech/memsearch#818 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
ehmpathy/rhachet-roles-bhuild#616 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia