Skip to content

Use environment variables #173

Answered by stevearc
josemiguelo asked this question in Q&A
Jul 18, 2023 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

If you check the docs for template definitions, the env should be at the same level as cmd and args. For example:

return {
 ...
  builder = function(params)
    return {
      cmd = {"mvn" },
      args = { "--version" },
      env = {
        JAVA_HOME = "/home/user/.asdf/installs/java/adoptopenjdk-8.0.362+9",
      },
    }
  end,
  condition = { dir = utils.path },
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@tony-sol
Comment options

@stevearc
Comment options

Answer selected by josemiguelo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants