mirror of
https://github.com/antonmedv/fx
synced 2024-11-11 07:10:28 +00:00
remove nested if (#268)
This commit is contained in:
parent
4226d1eb85
commit
8976805721
10
reduce.go
10
reduce.go
@ -24,14 +24,12 @@ func reduce(fns []string) {
|
|||||||
deno := false
|
deno := false
|
||||||
bin, err := exec.LookPath("node")
|
bin, err := exec.LookPath("node")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
bin, err = exec.LookPath("deno")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
bin, err = exec.LookPath("deno")
|
_, _ = fmt.Fprintf(os.Stderr, "Node.js or Deno is required to run fx with reducers.\n")
|
||||||
if err != nil {
|
os.Exit(1)
|
||||||
_, _ = fmt.Fprintf(os.Stderr, "Node.js or Deno is required to run fx with reducers.\n")
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
deno = true
|
|
||||||
}
|
}
|
||||||
|
deno = true
|
||||||
}
|
}
|
||||||
|
|
||||||
env := os.Environ()
|
env := os.Environ()
|
||||||
|
Loading…
Reference in New Issue
Block a user