Recursively debugging using "debug" doesn't preserve cli args
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 55/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- bash
- Domaine
- cli
Piste de recherche
Reproduce the issue with the provided git hook setup and the recursive "debug" command. Start by tracing how the recursive bashdb invocation is built, then verify that --tty /dev/tty and --tty_in /dev/tty are preserved so /tmp/otherscript enters the debugger instead of quitting.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
I was debugging a bash script whose stdin and stdout were not my tty (a git hook, to be precise), and passed --tty /dev/tty --tty_in /dev/tty which worked great to be able to debug that initial script.
However, that script ran some other scripts, and attempting to recursively step into those with the default "debug" command didn't work because that sub-invocation of bashdb didn't preserve the --tty and --tty_in arguments.
To reproduce the problem:
# Create a minimal git repo
git init myrepo
cd myrepo
touch foo ; git add foo ; git commit -m foo foo
# Set up the hook scripts:
cat <<EOF > .git/hooks/post-checkout
bashdb --tty /dev/tty --tty_in /dev/tty /tmp/somescript
EOF
chmod +x .git/hooks/post-checkout
echo "/tmp/otherscript" > /tmp/somescript
echo "echo end of somescript" >> /tmp/somescript
echo "echo in otherscript" > /tmp/otherscript
echo "echo another line" >> /tmp/otherscript
chmod +x /tmp/*script
git checkout HEAD # Trigger the hook
Then enter debug on the /tmp/otherscript line, and notice that you don't end up debugging it, the inner bashdb immediately quits with "That's all, folks..."
I'm guessing that many of the other cli args should be preserved to sub-bashdb invocations as well.
- Langage dominant
- Shell
- Étoiles
- 98
- Forks
- 13
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
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 Trepan-Debuggers/bashdb
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
Trepan-Debuggers/bashdb#63 · 4 commentaires ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
Trepan-Debuggers/bashdb#32 · 1 commentaire ·
Toutes les issues de Trepan-Debuggers/bashdb
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
bug cleanup
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
prime-radiant-inc/evener#3199 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
transitmatters/t-performance-dash#1217 ·
Les mainteneurs répondent en général sous 1 jour
-
Update bats version in CIOuverte
Difficulté 1/5 1-3 heures Accessibilité débutants 78/100
ekalinin/github-markdown-toc#176 ·