René's URL Explorer Experiment


Title: Fail more clearly if the `file` program is not installed on the runner by mbg · Pull Request #2234 · github/codeql-action · GitHub

Open Graph Title: Fail more clearly if the `file` program is not installed on the runner by mbg · Pull Request #2234 · github/codeql-action

X Title: Fail more clearly if the `file` program is not installed on the runner by mbg · Pull Request #2234 · github/codeql-action

Description: This PR checks more clearly whether we can successfully find the location of the file program and emits a clearer message in the build log as well as a warning-level diagnostic if it cannot be found. There is also a new integration test which checks that this works as intended. Since the check for whether the Go workaround is needed takes place before the database gets initialised, this PR also modifies the code for diagnostics to: Check if the database exists yet before writing a diagnostic. If it does not exist, the diagnostic is added to an array and flushed to disk later once the database is presumed to exist (init Action only) Merge / deployment checklist Confirm this change is backwards compatible with existing workflows. Confirm the readme has been updated if necessary. Confirm the changelog has been updated if necessary.

Open Graph Description: This PR checks more clearly whether we can successfully find the location of the file program and emits a clearer message in the build log as well as a warning-level diagnostic if it cannot be foun...

X Description: This PR checks more clearly whether we can successfully find the location of the file program and emits a clearer message in the build log as well as a warning-level diagnostic if it cannot be foun...

Opengraph URL: https://github.com/github/codeql-action/pull/2234

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits/:range(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:36387dac-a699-31e0-3b7f-74ef0a2725c5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC7AA:0295:3723E3C:4936C5F:6A655760
html-safe-nonce0cded25fee157f617c7c5e5c73150a691c0d9d25d20842321ec42cb5d19647fe
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0FBOjAyOTU6MzcyM0UzQzo0OTM2QzVGOjZBNjU1NzYwIiwidmlzaXRvcl9pZCI6IjUzMDIzNjE3Mjg2MDIxNzE4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacca5882c026a6794b96ed372e803e7438bf3fa369b03ff36d754ba1f3dedd070c
hovercard-subject-tagpull_request:1817868861
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
twitter:imagehttps://avatars.githubusercontent.com/u/278086?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/278086?s=400&v=4
og:image:altThis PR checks more clearly whether we can successfully find the location of the file program and emits a clearer message in the build log as well as a warning-level diagnostic if it cannot be foun...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/codeql-action git https://github.com/github/codeql-action.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id259445878
octolytics-dimension-repository_nwogithub/codeql-action
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id259445878
octolytics-dimension-repository_network_root_nwogithub/codeql-action
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release309153364422b3c499922d1a2a6404910a58ed8e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql-action%2Fpull%2F2234%2Fcommits%2F3901d1208a9452d7dd7ab94b87a1c3d69da74647
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql-action%2Fpull%2F2234%2Fcommits%2F3901d1208a9452d7dd7ab94b87a1c3d69da74647
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fcommits&source=header-repo&source_repo=github%2Fcodeql-action
Reloadhttps://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
Reloadhttps://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
Reloadhttps://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
Please reload this pagehttps://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
github https://github.com/github
codeql-actionhttps://github.com/github/codeql-action
Notifications https://github.com/login?return_to=%2Fgithub%2Fcodeql-action
Fork 476 https://github.com/login?return_to=%2Fgithub%2Fcodeql-action
Star 1.6k https://github.com/login?return_to=%2Fgithub%2Fcodeql-action
Code https://github.com/github/codeql-action
Issues 157 https://github.com/github/codeql-action/issues
Pull requests 24 https://github.com/github/codeql-action/pulls
Actions https://github.com/github/codeql-action/actions
Models https://github.com/github/codeql-action/models
Security and quality 2 https://github.com/github/codeql-action/security
Insights https://github.com/github/codeql-action/pulse
Code https://github.com/github/codeql-action
Issues https://github.com/github/codeql-action/issues
Pull requests https://github.com/github/codeql-action/pulls
Actions https://github.com/github/codeql-action/actions
Models https://github.com/github/codeql-action/models
Security and quality https://github.com/github/codeql-action/security
Insights https://github.com/github/codeql-action/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fcodeql-action%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fcodeql-action%2Fissues%2Fnew%2Fchoose
mbghttps://github.com/mbg
mainhttps://github.com/github/codeql-action/tree/main
mbg/clearer-file-command-failurehttps://github.com/github/codeql-action/tree/mbg/clearer-file-command-failure
Conversation 9 https://github.com/github/codeql-action/pull/2234
Findings https://github.com/github/codeql-action/pull/2234/findings
Commits 10 https://github.com/github/codeql-action/pull/2234/commits
Checks 0 https://github.com/github/codeql-action/pull/2234/checks
Files changed https://github.com/github/codeql-action/pull/2234/files
Please reload this pagehttps://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
Fail more clearly if the file program is not installed on the runner https://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647#top
Show all changes 10 commits https://github.com/github/codeql-action/pull/2234/files
8ea1a11 Produce a clearer error message when `file` is not installed mbg Apr 11, 2024 https://github.com/github/codeql-action/pull/2234/commits/8ea1a11e72f08f60af915502555b9cc476885489
1829b70 Emit diagnostic if `file` is not installed mbg Apr 11, 2024 https://github.com/github/codeql-action/pull/2234/commits/1829b70201ca913e6f6663e6442aad717acab421
96f44cb Add integration test for new diagnostic mbg Apr 11, 2024 https://github.com/github/codeql-action/pull/2234/commits/96f44cb9d26dd888572d0f1eed86eee91bd83841
d4e7b0e Check that the database exists before writing diagnostics to it mbg Apr 11, 2024 https://github.com/github/codeql-action/pull/2234/commits/d4e7b0e4930b52fb55b601a067bf652c6987ff6e
4b0172d Store diagnostics in memory until the database is available mbg Apr 11, 2024 https://github.com/github/codeql-action/pull/2234/commits/4b0172d9c2e8e400db6491a24b3d46cf0db3689d
3901d12 Unify error messages in `getFileType` mbg Apr 12, 2024 https://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
1ac88f3 Unconditionally report unwritten diagnostics at the end of the `init`… mbg Apr 12, 2024 https://github.com/github/codeql-action/pull/2234/commits/1ac88f37c709cfc54b2ee53c76d58ee5c085f24a
93f93fc Include "Linux" in diagnostic name and message mbg Apr 12, 2024 https://github.com/github/codeql-action/pull/2234/commits/93f93fc2ad5608413cce577eb1a93c0988f82f31
efc4746 Downgrade log levels for some messages to debug mbg Apr 12, 2024 https://github.com/github/codeql-action/pull/2234/commits/efc474680fa70a6df5c97b97233f665b4b7d6749
4fcf7a2 Add changelog entry mbg Apr 12, 2024 https://github.com/github/codeql-action/pull/2234/commits/4fcf7a216ce13f13ffe9f395a802a3f22f8190e6
Clear filters https://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
Please reload this pagehttps://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
Please reload this pagehttps://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
actions-util.js https://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647#diff-11e57a9c0915b5e6f55d41e377c4d3ffff3e8eedb5e9f48814d584bca9fcbac4
actions-util.js.map https://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647#diff-ccc8ca14fec3e5e01c6b1f61c3fa80dfd5c18e661b6a27f083f98777eabefe05
actions-util.ts https://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647#diff-272a83a2815879238f61d8c6a4358a34cf98138946d7e7e950851282d8ca0b7d
Prev https://github.com/github/codeql-action/pull/2234/commits/4b0172d9c2e8e400db6491a24b3d46cf0db3689d
Next https://github.com/github/codeql-action/pull/2234/commits/1ac88f37c709cfc54b2ee53c76d58ee5c085f24a
Please reload this pagehttps://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
https://github.com/mbg
mbghttps://github.com/github/codeql-action/commits?author=mbg
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
lib/actions-util.jshttps://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647#diff-11e57a9c0915b5e6f55d41e377c4d3ffff3e8eedb5e9f48814d584bca9fcbac4
View file https://github.com/github/codeql-action/blob/3901d1208a9452d7dd7ab94b87a1c3d69da74647/lib/actions-util.js
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
Please reload this pagehttps://github.com/github/codeql-action/pull/2234/commits/3901d1208a9452d7dd7ab94b87a1c3d69da74647
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.