-
Notifications
You must be signed in to change notification settings - Fork 188
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
CFE-4414: cf-net connect
now exits with 1 in case of error
#5673
Conversation
larsewi
commented
Jan 3, 2025
•
edited
Loading
edited
``` $ sudo /var/cfengine/bin/cf-net -H 192.168.123.456 connect Failed to connect to '192.168.123.456' $ echo $? 1 $ sudo /var/cfengine/bin/cf-net -H 127.0.0.1 connect Connected & authenticated successfully to '127.0.0.1' $ echo $? 0 ``` Ticket: CFE-4414 Changelog: Title Signed-off-by: Lars Erik Wik <[email protected]>
cf-net connect
now exits with 1 in case of errorcf-net connect
now exits with 1 in case of error
@cf-bottom Jenkins please :) |
Alright, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/11572/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-11572/ |
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.
Thanks!
@@ -472,7 +472,9 @@ static int CFNetRun(CFNetOptions *opts, char **args, char *hostnames) | |||
int ret = 0; |
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.
So ret
was not set to anything else than 0
before? Weird that we haven't been getting any warning/errors for this.
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 guess because we return ret
in the end.