GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Don't error in the unusual case that a file is on the search path by henrymercer · Pull Request #2660 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented Dec 19, 2024

Copy link
Copy Markdown
Contributor

In the unusual case that a file is on the search path, log a warning but don't throw.

I've accomplished this by switching our which implementation to use the standard Actions one within @actions/io but have also submitted a PR to safe-which: chrisgavin/safe-which#14.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@henrymercer
Use @actions/io to locate binaries
b58f447
Copilot AI review requested due to automatic review settings December 19, 2024 14:47
@henrymercer
henrymercer requested a review from a team as a code owner December 19, 2024 14:47
@henrymercer
Add changelog note
7d6d36c
Copilot AI reviewed Dec 19, 2024
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Copilot reviewed 23 out of 36 changed files in this pull request and generated no comments.

Files not reviewed (13)
  • package.json: Language not supported
  • queries/binary-planting.ql: Language not supported
  • src/init-action.ts: Evaluated as low risk
  • src/codeql.test.ts: Evaluated as low risk
  • src/tar.ts: Evaluated as low risk
  • src/init.ts: Evaluated as low risk
  • src/actions-util.ts: Evaluated as low risk
  • src/git-utils.ts: Evaluated as low risk
  • lib/util.js: Evaluated as low risk
  • src/analyze.ts: Evaluated as low risk
  • lib/analyze.js: Evaluated as low risk
  • lib/codeql.test.js: Evaluated as low risk
  • lib/init-action.js: Evaluated as low risk
Comments suppressed due to low confidence (3)

src/util.ts:1197

  • The function isBinaryAccessible should handle the case where the binary is found but is not executable. Consider adding a check to ensure the binary is executable after finding it.
await io.which(binary, true);

lib/tar.js:51

  • Ensure that the behavior of io.which when the binary is not found is covered by tests. This is critical to confirm that the new implementation does not introduce unexpected behavior.
const tar = await io.which("tar", true);

lib/actions-util.js:225

  • The error message should be more descriptive and user-friendly. Consider providing guidance on how to install the file program.
throw new FileCmdNotFoundError(`The `file` program is required, but does not appear to be installed. Please install it: ${e}`);

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
angelapwen
angelapwen approved these changes Dec 19, 2024
View reviewed changes

@angelapwen angelapwen left a comment

Copy link
Copy Markdown
Contributor

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.

Looks good — also looks like your PR to safe-which is merged, so not sure if we want to just use that?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@henrymercer

henrymercer commented Dec 19, 2024

Copy link
Copy Markdown
Contributor Author

My thinking was that it makes slightly more sense to use @actions/io for consistency with other first-party Actions, but I don't think there's a huge difference.

angelapwen reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
henrymercer merged commit d01b25e into main Dec 19, 2024
@henrymercer
henrymercer deleted the henrymercer/fix-error-file-on-path branch December 19, 2024 17:51
This was referenced Dec 20, 2024
Merge main into releases/v3 #2662
Merged
Merge releases/v3 into releases/v2 #2664
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
+1 more reviewer
@angelapwen angelapwen angelapwen approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@henrymercer @angelapwen
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.