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

Export layer_env::PATH_LIST_SEPARATOR #534

Open
edmorley opened this issue Dec 1, 2022 · 2 comments
Open

Export layer_env::PATH_LIST_SEPARATOR #534

edmorley opened this issue Dec 1, 2022 · 2 comments
Labels
enhancement New feature or request libcnb

Comments

@edmorley
Copy link
Member

edmorley commented Dec 1, 2022

Currently when setting ModificationBehavior::Delimiter in a buildpack (eg for a path based env var), one has to either:

  1. Hardcode : as the delimeter in the buildpack (and just ignore the fact it wouldn't work on Windows)
  2. Reimplement the platform specific definitions here:
    #[cfg(target_family = "unix")]
    const PATH_LIST_SEPARATOR: &str = ":";
    #[cfg(target_family = "windows")]
    const PATH_LIST_SEPARATOR: &str = ";";

We should export them instead.

Also, those constants should probably be moved higher up in that file, since currently they are hidden after the tests.

@edmorley edmorley added enhancement New feature or request libcnb labels Dec 1, 2022
@Malax
Copy link
Member

Malax commented Dec 1, 2022

I like this idea! 👍🏻

@edmorley
Copy link
Member Author

I think we should maybe focus on fixing the default behaviour upstream instead of this - see:
buildpacks/spec#285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request libcnb
Projects
None yet
Development

No branches or pull requests

2 participants