Repository navigation
Conversation
…erpreter Without a target `<python>`, `-E` had no effect: the SBOM reused the already-imported `sys.path`, which honored parent `PYTHON*` env vars at startup. Now the current executable is probed with `python -E` instead. Idea from CycloneDX#1123 by Elton Chang. Follow-up to CycloneDX#1106, see CycloneDX#1045. Co-authored-by: Elton Chang <80650461+Notle-eltoN@users.noreply.github.com> Signed-off-by: Julio César Suástegui <juliosuas@gmail.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | ✅ 0 (≤ 20 complexity) |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Documentation build overview
|
Member
|
let's broaden the topic a bit: |
…erpreter Extends the previous change to `-S` as requested in review: when `-S` and/or `-E` is given without a target `<python>`, the current executable is probed with the corresponding flag(s) instead of reusing the already-imported `sys.path`. Without either flag, behavior is unchanged. Co-authored-by: Elton Chang <80650461+Notle-eltoN@users.noreply.github.com> Signed-off-by: Julio César Suástegui <juliosuas@gmail.com>
Contributor
Author
|
Makes sense. Extended it so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Follow-up to #1106. Without a target
<python>,-Edid nothing: the SBOM reused the running interpreter'ssys.path, which already honored parentPYTHON*variables at startup. With this change,cyclonedx-py environment -E(no target) probessys.executablewithpython -E, same as when a target is given. Default behavior without-Eis unchanged.The idea comes from @EltonChang1's #1123, so he's credited as co-author. Help text and
docs/usage.rstare updated, and a regression test covers the no-target case (it fails without the fix).Resolves or fixes issue: #1045
AI Tool Disclosure
Cursor coding agentCursor coding agent (model not exposed)Implement the no-target -E probe from #1123 as a minimal follow-up to #1106, with a regression test and docs; I reviewed and tested the result.Affirmation