-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test background stop timeout #16
base: master
Are you sure you want to change the base?
Conversation
trap 'echo "got interrupted"' INT | ||
for i in {1..10} | ||
do | ||
echo "sleeping ${'$'}i..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this substitution, what is it supposed to do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${'$'}
is a way to print a literal $
within a multiline string literal """
.
Otherwise it'd be $i
and there's no Kotlin i
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it on Bash and ZSH and in both cases I got "bad substitution" error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try $i
in Bash/ZSH. Or run/debug the JUnit test
Here's the Bash version:
trap 'echo "got interrupted"' INT
for i in {1..10}
do
echo "sleeping $i..."
sleep 1
done
You can try ctrl-C while it loops
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OMG, brain fog. It' a Kotlin substitution 🤦 . Ignore me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to restore your bash session to normal, you can clear the trap via trap - INT
CI is green on my fork. |
844fa06
to
4aeeb76
Compare
It got cancelled again. I guess I'll retry later |
No description provided.