Skip to content

Conversation

zyfy29
Copy link
Contributor

@zyfy29 zyfy29 commented Aug 21, 2025

close #3847

@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 08:21
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a warning message when both environment variable blocklist and allowlist are configured simultaneously. When both LIMA_SHELLENV_BLOCK and LIMA_SHELLENV_ALLOW are set, the system now warns the user and ignores the blocklist to avoid configuration conflicts.

  • Modified getBlockList() and getAllowList() functions to return boolean flags indicating if the environment variables are explicitly set
  • Added logic in FilterEnvironment() to detect when both lists are configured and emit a warning
  • Updated all test cases to handle the new return signature with boolean flags

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pkg/envutil/envutil.go Modified functions to return set flags and added warning logic for conflicting configurations
pkg/envutil/envutil_test.go Updated test cases to handle new function signatures and verify set flags

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: zyfy29 <wasuremono127@gmail.com>
@zyfy29 zyfy29 force-pushed the feat-warning-with-both-allow-block branch from 5d74574 to db733b7 Compare August 22, 2025 04:48
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@jandubois jandubois added this to the v2.0.0 milestone Aug 22, 2025
@jandubois jandubois merged commit 119d1dd into lima-vm:master Aug 22, 2025
36 checks passed
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.

Create warning when LIMA_SHELLENV_BLOCK is ignored
2 participants