File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : " Environment Variables"
3+ teaching : 10
4+ exercises : 0
5+ questions :
6+ - " How do I set the value of environment variables for a tool's execution?"
7+ objectives :
8+ - " Learn how to pass environment variables to a tool's runtime."
9+ keypoints :
10+ - " Tools run in a restricted environment with a minimal set of environment
11+ variables."
12+ - " Use the `EnvVarRequirement` field to set environment variables inside a
13+ tool's environment."
14+ ---
15+ Tools run in a restricted environment and do not inherit most environment
16+ variables from the parent process. You can set environment variables for
17+ the tool using ` EnvVarRequirement ` .
18+
19+ * env.cwl*
20+
21+ ```
22+ {% include cwl/env.cwl %}
23+ ```
24+
25+ * echo-job.yml*
26+
27+ ```
28+ {% include cwl/echo-job.yml %}
29+ ```
30+
31+ Now invoke ` cwl-runner ` with the tool wrapper and the input object on the
32+ command line:
33+
34+ ```
35+ $ cwl-runner env.cwl echo-job.yml
36+ [job 140710387785808] /home/example$ env
37+ PATH=/bin:/usr/bin:/usr/local/bin
38+ HELLO=Hello world!
39+ TMPDIR=/tmp/tmp63Obpk
40+ Final process status is success
41+ {}
42+ ```
You can’t perform that action at this time.
0 commit comments