Open
Conversation
Owner
|
Interesting -- I don't see that behavior on my system -- the script
correctly contains [ $? -eq 0 ]
is there something special in your environment?
-g
…On Wed, Nov 26, 2025 at 6:56 AM Jan Kofroň ***@***.***> wrote:
In case of passing the -e parameter (finish after the "first" error
found) to swarm, the generated scripts contain sub-condition 0 -eq 0,
which is obviously wrong (I experienced misbehaviour). When escaping the
$? as \\$?, the resulting scripts really test the result of wc -l, which
is the intended behaviour, I believe.
------------------------------
You can view, comment on, or merge this pull request online at:
#1
Commit Summary
- 99d9c4f
<99d9c4f>
Fixing escaping output
File Changes
(1 file <https://github.com/nimble-code/Swarm/pull/1/files>)
- *M* Src/swarm.c
<https://github.com/nimble-code/Swarm/pull/1/files#diff-022e86c3740ab44a7706dcc5982c36239b8b0ac167ca474bcc71dc19d6a2e67b>
(2)
Patch Links:
- https://github.com/nimble-code/Swarm/pull/1.patch
- https://github.com/nimble-code/Swarm/pull/1.diff
—
Reply to this email directly, view it on GitHub
<#1>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK6L6IP7ATYKD6Y43MKXF5T36W5SJAVCNFSM6AAAAACNIUDACSVHI2DSMVQWIX3LMV43ASLTON2WKOZTGY3DOOBVG4ZTMNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Author
|
I apologize for not sharing these details, I actually planned to... Well, I am on arch linux, GNU bash, version 5.3.3(1)-release (x86_64-pc-linux-gnu), so nothing special, I would say. I suspect bash here – do you use a different sh? I will try different machines and OSs to see, and let you know! Thanks a lot for your response :-)! -Jan |
Author
|
I have just tried two other Linux OSes (Rocky Linux 9.5 and Ubuntu 22.04), tried to use zsh and dash instead of bash (by modifying the shebang in the generated swarm script), and still getting the same behaviour under any configuration ([ 0 -eq 0 ]). An interesting issue, I have to admit. |
Owner
|
I tried on both cygwin under Windows11 and with bash in Ubuntu and both
work correctly.
Also recompiled the swarm.c code to make sure.
The code hasn't changed in about 16 years..... A mystery.
…On Thu, Nov 27, 2025 at 2:01 AM Jan Kofroň ***@***.***> wrote:
*jankofron* left a comment (nimble-code/Swarm#1)
<#1 (comment)>
I have just tried two other Linux OSes (Rocky Linux 9.5 and Ubuntu 22.04),
tried to use zsh and dash instead of bash (by modifying the shebang in the
generated swarm script), and still getting the same behaviour under any
configuration ([ 0 -eq 0 ]). An interesting issue, I have to admit.
—
Reply to this email directly, view it on GitHub
<#1 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK6L6IOSPK6CG5TMVQI7SGT363DWJAVCNFSM6AAAAACNIUDACSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKOBVGAZTCOJRGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In case of passing the
-eparameter (finish after the "first" error found) to swarm, the generated scripts contain sub-condition0 -eq 0, which is obviously wrong (I experienced misbehaviour). When escaping the$?as\\$?, the resulting scripts really test the result ofwc -l, which is the intended behaviour, I believe.