Skip to content

Commit

Permalink
Add example with env to Owl.System.shell
Browse files Browse the repository at this point in the history
  • Loading branch information
fuelen committed Sep 26, 2023
1 parent 5b05678 commit 7dd0a41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/owl/system.ex
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ defmodule Owl.System do
> Owl.System.shell("echo postgresql://postgres:[email protected]:5432")
# 22:36:51.797 [debug] $ sh -c "echo postgresql://postgres:********@127.0.0.1:5432"
{"postgresql://postgres:[email protected]:5432\\n", 0}
> Owl.System.shell("echo $PASSWORD $USERNAME", env: [{"USERNAME", "john"}, {"PASSWORD", {:secret, "qwerty"}}])
# 12:38:27.704 [debug] $ USERNAME=john PASSWORD=******** sh -c "echo \\$PASSWORD \\$USERNAME"
{"qwerty john\\n", 0}
"""
@spec shell(
binary(),
Expand Down

0 comments on commit 7dd0a41

Please sign in to comment.