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 set environment variables #127

Open
trombonehero opened this issue Mar 12, 2018 · 0 comments
Open

Ability to set environment variables #127

trombonehero opened this issue Mar 12, 2018 · 0 comments

Comments

@trombonehero
Copy link

I have a Teamocil YAML file that contains a lot of snippets like:

windows:
  - name: ...
    root: ...
    panes:
      - commands:
        - export CC=...
        - export CXX=...
        - export BUILD_ROOT=something/Debug
        - export PATH=...:something/Debug/bin
      - commands:
        - export CC=...
        - export CXX=...
        - export BUILD_ROOT=something/Release
        - export PATH=...:something/Release/bin
      - ...

This is fine when using sh(1) or compatible shells (bash, zsh...), but breaks with other shells (csh, fish) that prefer setenv or set --export. If Teamocil were to afford the ability to manipulate the environment via Ruby's ENV hash, I'd be able to write descriptions such as the following that work with different sorts of shells:

windows:
  - name: ...
    root: ...
    env:
      CC: ...      # would apply to all panes in this window
      CXX: ..      # would apply to all panes in this window
    panes:
      - env:       # only need to specify vars specific to this pane:
          BUILD_ROOT: ...:something/Debug
          PATH: ...:something/Debug/bin
      - env:
          BUILD_ROOT: ...:something/Release
          PATH: ...:something/Release/bin
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

No branches or pull requests

1 participant