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

Ability to create lists in Env #31

Closed
1 task done
RuiNtD opened this issue Aug 28, 2023 · 5 comments · Fixed by #37
Closed
1 task done

Ability to create lists in Env #31

RuiNtD opened this issue Aug 28, 2023 · 5 comments · Fixed by #37
Assignees

Comments

@RuiNtD
Copy link
Contributor

RuiNtD commented Aug 28, 2023

Code of Conduct

  • I agree to follow this project's Code of Conduct

What would you like to see changed/added?

The ability to create lists, similar to Path, easily cross-platform, like this:

env:
  - name: USERNAMES
    value: |
      dylan
      steve
      bob ross
# Windows
$Env:USERNAMES = "dylan;steve;bob ross"
# Linux
$Env:USERNAMES = "dylan:steve:boss ross"

Or, with an optional delimeter parameter:

env:
  - name: USERNAMES
    value: |
      dylan
      steve
      bob ross
    delimeter: ","
$Env:USERNAMES = "dylan,steve,bob ross"
@JanDeDobbeleer
Copy link
Owner

@RuiNtD there's no such thing though. Environment variables are always strings, this is a very specific use-case where I fail to see the use-case for as it assumes you're actually having different env var logic in an application per platform.

@RuiNtD
Copy link
Contributor Author

RuiNtD commented Aug 29, 2023

There are many applications that take lists of strings, usually paths and usually for configuration, in an ENV like how the OS does with Path. It would just be nice to be able to format them in multiple rows instead of just one.

@JanDeDobbeleer
Copy link
Owner

Implementing this is actually feasible, I would allow the delimiter to be templatable though.

@RuiNtD
Copy link
Contributor Author

RuiNtD commented Aug 29, 2023

I mean, I did mention a delimiter option in the original post. Lol

@JanDeDobbeleer
Copy link
Owner

@RuiNtD I know, and upon re-read I went with that option.

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 a pull request may close this issue.

2 participants