-
Notifications
You must be signed in to change notification settings - Fork 2.3k
shell: make -bail work for more errors #16594
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
Conversation
Actually, I think this should also always return 1, even without Or should I modify |
@@ -4656,11 +4659,11 @@ void ShellState::ProcessDuckDBRC(const char *file) { | |||
// could not find home directory - return | |||
raw_printf(stderr, "-- warning: cannot find home directory;" | |||
" cannot read ~/.duckdbrc\n"); | |||
return; | |||
return true; |
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.
Treated as a warning and not an error (according to the log message)
@Mytherin Let me know what you think. 🙏 |
I think |
877e71a
to
9d11d95
Compare
@Mytherin I took another pass. The new version makes more sense because only the init options |
- -cmd and -init with -bail will exit on error without starting the shell - -cmd and -init without -bail will continue to start the shell as before - -f / -s / -c will now always exit with 1 on error
9d11d95
to
ad11731
Compare
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 for the changes! LGTM
There's an uninitialized value issue in the use of |
@Tishj Good catch! I will create a follow-up PR. Two questions though:
|
Ok, found it with |
This is a follow-up to #16594, which introduced the problem. Thanks to @Tishj for bringing it up [here](#16594 (comment)). (I only encountered the error with `make CXXFLAGS=-Wall`, which makes me wonder a) why that's not the default and b) why CI didn't catch this bug?)
JSON bugfixes (duckdb/duckdb#16729) Call Notify External Repositories from Invoke CI (duckdb/duckdb#16747) shell: make -bail work for more errors (duckdb/duckdb#16594)
JSON bugfixes (duckdb/duckdb#16729) Call Notify External Repositories from Invoke CI (duckdb/duckdb#16747) shell: make -bail work for more errors (duckdb/duckdb#16594)
JSON bugfixes (duckdb/duckdb#16729) Call Notify External Repositories from Invoke CI (duckdb/duckdb#16747) shell: make -bail work for more errors (duckdb/duckdb#16594)
JSON bugfixes (duckdb/duckdb#16729) Call Notify External Repositories from Invoke CI (duckdb/duckdb#16747) shell: make -bail work for more errors (duckdb/duckdb#16594)
JSON bugfixes (duckdb/duckdb#16729) Call Notify External Repositories from Invoke CI (duckdb/duckdb#16747) shell: make -bail work for more errors (duckdb/duckdb#16594)
I noticed that
-bail
doesn't have any effect in several cases, most notably when passing init commands, so I tried to fix it.-cmd
and-init
with-bail
will exit on error without starting the shell-cmd
and-init
without-bail
will continue to start the shell as before-f
/-s
/-c
will now always exit with 1 on error