Skip to content

Commit 13a46f4

Browse files
author
Martin Lopes
authored
Merge pull request #1781 from ssbarnea/patch-1
Update PATH prepending with practical example
2 parents 0adcc74 + 41fc08f commit 13a46f4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

content/actions/reference/workflow-commands-for-github-actions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,13 @@ steps:
301301

302302
`echo "{path}" >> $GITHUB_PATH`
303303

304-
Prepends a directory to the system `PATH` variable for all subsequent actions in the current job. The currently running action cannot access the new path variable.
304+
Prepends a directory to the system `PATH` variable and makes it available to all subsequent actions in the current job; the currently running action cannot access the updated path variable. To see the currently defined paths for your job, you can use `echo "$PATH"` in a step or an action.
305305

306306
#### Example
307307

308+
This example demonstrates how to add the user `$HOME/.local/bin` directory to `PATH`:
309+
308310
``` bash
309-
echo "/path/to/dir" >> $GITHUB_PATH
311+
echo "$HOME/.local/bin" >> $GITHUB_PATH
310312
```
311313
{% endif %}

0 commit comments

Comments
 (0)