Shell commands invoke /bin/sh directly
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- haskell
- Domínio
- operating-systems
Direção de pesquisa
Comece lendo a implementação e a documentação de System.Process.shell, concentrando-se em como ele seleciona /bin/sh e invoca comandos. Reproduza o comportamento diferente com bash e dash e, em seguida, revise a discussão do issue para determinar se o resultado desejado é um shell configurável, um aviso de portabilidade ou outro comportamento documentado.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
I am a maintainer of the obelisk framework. This week, I had to debug a very strange issue where some shell escaping was "working on my machine"™, but not my friend's. obelisk provides an integrated development environment that uses nix to ensure consistent behavior across platforms. In particular, we try to lock down which shell that is used when we invoke other executables.
However, we cannot ensure that our dependencies that use System.Process choose a shell in a way we can modify: In particular, ghcid uses System.Process.shell, and so on my machine, where /bin/sh is bash, and my friend's machine, where /bin/sh is dash, the behavior of shell escaping is different, and this causes ghcid to fail to invoke it's --command argument correctly.
My gut is that, just as one would reflexively invoke #!/usr/bin/env bash in a shell script that one wants to be portable, one would want System.Process to invoke /usr/bin/env sh -c <cmd> instead of /bin/sh -c <cmd> directly. Otherwise, the user cannot control the shell that is used at all without invasively modifying their entire system environment. A user may be surprised that the shell that they use to run their haskell program is not the same shell used to invoke shell commands from within the program, for example. I was surprised, at least!
This would be a rather significant change to the behavior of shell commands, so I'm not sure if that this change is desirable. At the least, a warning about portability would be appreciated.
- Linguagem predominante
- Haskell
- Estrelas
- 91
- Forks
- 93
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
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 haskell/process
-
bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
-
HAVE_PIPE2 at compile time but not at runtime causes segfault on macOSTalvez já em andamento @alt-romes assumiu há 3 dias. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
-
posix_spawn falls back to fork() when create_group = True due to HAVE_DECL_ macro mismatchTalvez já em andamento @lei-jia-xing assumiu há 11 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 57/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
Todas as issues de haskell/process
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
haskell/bytestring#730 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
seal-harness/seal-harness#399 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
fmidue/codeworld-tasks#124 ·
-
allow haskell-src-exts-1.24Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
reflex-frp/reflex#563 ·