Explorar el Código

refactor: use pattern instead of grep

Kyle P Davis hace 8 meses
padre
commit
425d13b086
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      gimme

+ 1 - 1
gimme

@@ -23,7 +23,7 @@ export FORCE=${FORCE:=""}
 ! [[ "$DEBUG" ]] || set -x
 
 has() {
-	if [[ "$FORCE" ]] && echo " $INIT_GIMMES " | grep -q " $1 "; then
+	if [[ "$FORCE" ]] && [[ " $INIT_GIMMES " == *" $1 "* ]]; then
 		false
 	else
 		command -v "$1" >/dev/null