Skip to content
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

Require a main program (fix #2785) #2790

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

nicowilliams
Copy link
Contributor

No description provided.

@nicowilliams nicowilliams marked this pull request as ready for review July 29, 2023 18:45
@nicowilliams
Copy link
Contributor Author

I wouldn't go so far as to say that this has to be in 1.7.

src/linker.c Outdated Show resolved Hide resolved
@nicowilliams nicowilliams force-pushed the fix_2785 branch 3 times, most recently from 6709b0f to f7e40af Compare July 29, 2023 21:41
src/linker.c Outdated
@@ -407,6 +407,12 @@ int load_program(jq_state *jq, struct locfile* src, block *out_block) {
if (nerrors)
return nerrors;

if (!block_has_main(program)) {
jq_report_error(jq, jv_string("jq: error: Top-level program not given (try \".\")\n"));
Copy link
Contributor

@itchyny itchyny Jul 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need a newline at the end because err_cb prints with it.

@nicowilliams
Copy link
Contributor Author

Pushing w/o waiting for checks to save builder minutes.

@nicowilliams nicowilliams merged commit 27a4d57 into jqlang:master Aug 2, 2023
20 of 27 checks passed
itchyny added a commit that referenced this pull request Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants