Skip to content

chore: ignore case for value of ASDF_FORCE_PREPEND environment variable#2026

Merged
Stratus3D merged 1 commit intoasdf-vm:masterfrom
machupicchubeta:be_tolerant_of_force_prepend_env
Mar 20, 2025
Merged

chore: ignore case for value of ASDF_FORCE_PREPEND environment variable#2026
Stratus3D merged 1 commit intoasdf-vm:masterfrom
machupicchubeta:be_tolerant_of_force_prepend_env

Conversation

@machupicchubeta
Copy link
Copy Markdown
Contributor

@machupicchubeta machupicchubeta commented Mar 19, 2025

Summary

I agree that it would be valid even if it is set in uppercase as well as lowercase.

@Stratus3D commented:

We might want to be able to handle inconsistent case here. Some folks might set this to YES by mistake and I think that should be handled.

Other Information

I think this code change did not need to be mentioned in the spec, so I did not add it there. What do you think? I would like to hear the committer's opinion.

Current Specification is:

  • ### `ASDF_FORCE_PREPEND`
    Whether or not to prepend the `asdf` shims and path directories to the front-most (highest-priority) part of the `PATH`.
    - If Unset: On macOS, defaults to `yes`; but on other systems, defaults to `no`
    - If `yes`: Force `asdf` directories to the front of the `PATH`
    - If set to any string _other_ than `yes`: Do _not_ force `asdf` directories to the front of the `PATH`
    - Usage: `ASDF_FORCE_PREPEND=no . "<path-to-asdf-directory>/asdf.sh"`

@machupicchubeta machupicchubeta requested a review from a team as a code owner March 19, 2025 17:48
@machupicchubeta machupicchubeta force-pushed the be_tolerant_of_force_prepend_env branch from a9cd68c to 33c2a92 Compare March 19, 2025 17:49
Comment thread internal/config/config.go Outdated
I agree that it would be valid even if it is set in uppercase as well as lowercase.

@Stratus3D commented:
- asdf-vm#2011 (comment)
> We might want to be able to handle inconsistent case here. Some folks might set this to `YES` by mistake and I think that should be handled.
@machupicchubeta machupicchubeta force-pushed the be_tolerant_of_force_prepend_env branch from 33c2a92 to cba96c0 Compare March 20, 2025 18:34
@Stratus3D Stratus3D changed the title chore: Be tolerant to ASDF_FORCE_PREPEND environment variable chore: Ignore case for value of ASDF_FORCE_PREPEND environment variable Mar 20, 2025
@Stratus3D Stratus3D changed the title chore: Ignore case for value of ASDF_FORCE_PREPEND environment variable chore: ignore case for value of ASDF_FORCE_PREPEND environment variable Mar 20, 2025
@Stratus3D Stratus3D merged commit 3e8d0e5 into asdf-vm:master Mar 20, 2025
13 checks passed
@machupicchubeta machupicchubeta deleted the be_tolerant_of_force_prepend_env branch March 21, 2025 06:37
@machupicchubeta
Copy link
Copy Markdown
Contributor Author

@andrecloutier @Stratus3D
Thank you for the review and merge! 🎉

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.

3 participants