Skip to content

Commit

Permalink
fix: script does not work as intended
Browse files Browse the repository at this point in the history
  • Loading branch information
ssiyad committed Jun 5, 2021
1 parent 0510fb3 commit 27f38ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ func synchronize(p string) error {
}

s := c.Exec
s = os.ExpandEnv(s)

_, err = os.Stat(c.Exec)
if err == nil {
e, err := os.ReadFile(c.Exec)
Expand Down Expand Up @@ -167,7 +169,6 @@ func synchronize(p string) error {
"&item_authorEmail": itemAuthorEmail,
} {
s = strings.ReplaceAll(s, q, r)
s = os.ExpandEnv(s)
}

err = exec.Command("sh", "-c", s).Run()
Expand Down

0 comments on commit 27f38ba

Please sign in to comment.