Impossible to handle shell exceptions with shell(),
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
Piste de recherche
Aucun fichier source ni test n’est nommé. Commencez par retracer l’implémentation de shell() et le chemin de gestion des exceptions de try(); examinez ensuite comment ShellException renseigne son message et comment exception[1] est exposée. C’est terminé lorsque les échecs de shell rendent le stderr de la commande disponible via la valeur d’exception documentée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
CMDHELPER-3020 - Reported by VergilPrime
So lets say I run a command in shell(). Lets say the code is shell(@command).
I run it, something's wrong so it errors. I see "ShellException" in console, but not much else.
I want to see what the problem is so I do @output = shell(@command); sys_out(@output) to check to see what's going on. The problem is, because shell threw ShellException, sys_out(@output) will never run.
So lets say I'm a super smart cookie and I do try(@output = shell(@command), sys_out(@output)) so that sys_out() runs when shell() fails. @output is still empy.
One last thing we can try, try(shell(@command),@exception,sys_out(@exception[1])).
This should work because @exception "... is set to an array containing the following information about the exception: ... 1 - The message generated by the exception..."
and shell() "... throws a ShellException with the exception message set to the syserr output if the process exits with an exit code that isn't the expectedExitCode..."
Upon running this code we find that @exception[1] is empty.
- Langage dominant
- Java
- Étoiles
- 128
- Forks
- 70
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de EngineHub/CommandHelper
-
discussion wanted documentation
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
EngineHub/CommandHelper#1403 ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
EngineHub/CommandHelper#1370 · 1 commentaire ·
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
EngineHub/CommandHelper#1354 ·
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
EngineHub/CommandHelper#1349 · 3 commentaires ·
-
bug
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
EngineHub/CommandHelper#1341 · 2 commentaires ·
Toutes les issues de EngineHub/CommandHelper
Issues similaires
-
certification
Difficulté 1/5 Moins d'une heure Accessibilité débutants 80/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Ouvertebug ecr
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Needs: Triage Type: Feature request
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
github/copilot-sdk#2760 ·