Skip to content

Conversation

@alirana01
Copy link
Collaborator

@alirana01 alirana01 commented Feb 6, 2026

Description

Added the eim select in sourcing scripts. This should select the correct version for eim and not have issues as mentioned in Jira ticket EIM-89

This is supposed to work if the eim is in path and fail silently as well.

Testing

Run the activation script and verify that eim select runs
also make sure that eim is in path.

We need to verify this with eim not in Path to see that the sourcing works for activation script and no errors are shown we have to fail silently in case of errors for eim select


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@alirana01 alirana01 self-assigned this Feb 6, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @alirana01, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses an issue where the eim select command was not being properly executed during the environment activation process, potentially leading to an incorrect eim version being used. By embedding the eim select command directly into the Bash and PowerShell activation scripts, it ensures that the appropriate eim version is always selected when the environment is sourced. The changes also include robust handling for cases where eim might not be available, preventing script failures.

Highlights

  • eim select Integration: The eim select command has been integrated into both Bash and PowerShell activation scripts to ensure the correct eim version is selected upon environment setup, addressing issues described in Jira ticket EIM-89.
  • Robust eim Path Resolution: The absolute path to the eim executable is now captured early in both activation scripts, before any PATH environment variable modifications, to guarantee that the correct eim binary is invoked.
  • Silent Error Handling: The execution of eim select is designed to fail silently, preventing activation script failures if eim is not found or the command encounters an error, as requested in the PR description.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src-tauri/bash_scripts/activate_idf_template.sh
    • Added a line to capture the absolute path of the eim binary using command -v eim early in the script.
    • Introduced a conditional block at the end of the script to execute $_EIM_BIN select "{{idf_version}}" if eim is found and executable, with output redirected to /dev/null for silent operation.
  • src-tauri/powershell_scripts/idf_fragment_template.ps1
    • Added a line to capture the absolute path of the eim binary using (Get-Command eim -ErrorAction SilentlyContinue).Source early in the script.
    • Introduced a conditional if block with a try-catch statement at the end of the script to execute & $_EimBinPath select "{{idf_version}}" silently, and print a confirmation message if successful.
Activity
  • The pull request is currently marked as a Work In Progress (WIP).
  • The author has provided a checklist for submission, indicating ongoing development and verification steps.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

gemini-code-assist[bot]

This comment was marked as off-topic.

@alirana01 alirana01 force-pushed the eim_select_activation_script branch from 36ee489 to c3a8a55 Compare February 6, 2026 14:06
@alirana01 alirana01 changed the title (WIP) EIM-89: eim select added for the activation script EIM-89: eim select added for the activation script Feb 9, 2026
# Sync selection with eim_idf.json for IDEs (silent on failure)
if ($_EimBinPath) {
try {
& $_EimBinPath select "{{idf_version}}" 2>$null
Copy link
Collaborator

@Hahihula Hahihula Feb 10, 2026

Choose a reason for hiding this comment

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

I am almost sure the syntax 2>$null was introduced in PS5 (or was buggy before and was fixed in v5) and may not work on PS4. Could you please verify?
But as it's inside a try-catch block, this should not be a real issue, just a nitpick.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

$null is part of Powershell since v1.0 and since v3.0 you can basically redirect error stream using this

)

# Capture absolute eim path early (before PATH changes)
$_EimBinPath = (Get-Command eim -ErrorAction SilentlyContinue).Source
Copy link
Collaborator

Choose a reason for hiding this comment

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

If no EIM is present, you are effectively calling null.Source, which will fail and probably not silently. Can you check this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is working fine I have verified it and -ErrorAction flag is supposed to skip this as it will simply return the PS variable $null.

Copy link
Collaborator

@Hahihula Hahihula left a comment

Choose a reason for hiding this comment

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

LGTM! After clearing up my concerns, I am happy. ;-) Thanks for the update.

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.

2 participants