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

Add try-catch to VM-Pip-Install #1258

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sara-rn
Copy link
Contributor

@sara-rn sara-rn commented Jan 24, 2025

Remove try-catch from install scripts that use VM-Pip-Install
Closes #1205

@sara-rn sara-rn force-pushed the git-pip-install-try-catc branch 3 times, most recently from 16e9df4 to f2e3b1c Compare January 24, 2025 11:21
@sara-rn sara-rn requested a review from Ana06 January 24, 2025 14:41
Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @sara-rn.

[nitpick] The commit message is a bit confusing and it does not explain why the change is needed. I propose to improve it as follows:

Add try-catch to VM-Pip-Install

Add missing `try-catch` to `VM-Pip-Install` so that packages using this
function (such as ida.plugin.hashdb.vm) don't have to add a try-catch. 

ForEach ($library in $libraries.Split(",")) {
# Ignore warning with `-W ignore` to avoid warnings like deprecation to fail the installation
Invoke-Expression "py -3.10 -W ignore -m pip install $library --disable-pip-version-check 2>&1 >> $outputFile"
try{
Copy link
Member

Choose a reason for hiding this comment

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

[nitpick]

Suggested change
try{
try {

}
Install-ChocolateyZipPackage @packageArgs
Copy link
Member

Choose a reason for hiding this comment

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

you can't remove the try-catch in packages/ida.plugin.capa.vm/tools/chocolateyinstall.ps1 as the installation of the rules does not use the helper function and that could fail too.

@sara-rn sara-rn force-pushed the git-pip-install-try-catc branch 3 times, most recently from 2da03d2 to fcd2527 Compare January 24, 2025 16:39
Add missing `try-catch` to `VM-Pip-Install` so that packages using this
function (such as ida.plugin.hashdb.vm) don't have to add a try-catch.
@sara-rn sara-rn force-pushed the git-pip-install-try-catc branch from fcd2527 to 8c481fa Compare January 24, 2025 16:42
@sara-rn
Copy link
Contributor Author

sara-rn commented Jan 24, 2025

@Ana06 changes have been addressed, thanks for the review

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.

Add try-catch to VM-Pip-Install
2 participants