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

Update shellIntegration-bash.sh #146

Closed
wants to merge 1 commit into from
Closed

Conversation

InSelfControll
Copy link

@InSelfControll InSelfControll commented Dec 20, 2024

Check if the system is NixOS if yes unset this var for fixing the error "Segmentation fault (core dumped)"

[ -f /etc/NIXOS ] && unset LD_LIBRARY_PATH


Important

Add check for NixOS in shellIntegration-bash.sh to unset LD_LIBRARY_PATH and prevent segmentation faults.

  • Behavior:
    • In shellIntegration-bash.sh, check for NixOS by verifying the existence of /etc/NIXOS.
    • If NixOS is detected, unset LD_LIBRARY_PATH to prevent segmentation fault errors.

This description was created by Ellipsis for 189af75. It will automatically update as commits are pushed.

# Check if the system is NixOS if yes unset this var for fixing the error "Segmentation fault (core dumped)"
[ -f /etc/NIXOS ] && unset LD_LIBRARY_PATH
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 189af75 in 2 minutes and 4 seconds

More details
  • Looked at 14 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_10l70cZ6cnMnytfn


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@@ -10,6 +10,9 @@ fi

VSCODE_SHELL_INTEGRATION=1

# Check if the system is NixOS if yes unset this var for fixing the error "Segmentation fault (core dumped)"
[ -f /etc/NIXOS ] && unset LD_LIBRARY_PATH
Copy link

Choose a reason for hiding this comment

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

The check for NixOS should use /etc/os-release instead of /etc/NIXOS for reliability. Consider using:

Suggested change
[ -f /etc/NIXOS ] && unset LD_LIBRARY_PATH
[ -f /etc/os-release ] && grep -q 'ID=nixos' /etc/os-release && unset LD_LIBRARY_PATH

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.

1 participant