Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
fix(runflow): Added ablity to use global flow command to runflow script.
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronCoplan committed Oct 1, 2018
1 parent bfa2b7e commit 5e639e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/runflow
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#!/usr/bin/env bash

flow version > /dev/null 2>&1
uses_global_flow=$?

yarn flow version > /dev/null 2>&1
uses_yarn=$?

npm run flow version > /dev/null 2>&1
uses_npm=$?

if [ $uses_yarn -eq 0 ]; then
if [ $uses_global_flow -eq 0 ]; then
flow
elif [ $uses_yarn -eq 0 ]; then
yarn flow
elif [ $uses_npm -eq 0 ]; then
npm run flow
Expand Down

0 comments on commit 5e639e8

Please sign in to comment.