From 71a669b5bca4a28b8585360636e77970936ae8f8 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 26 May 2017 15:32:24 +0100 Subject: [PATCH] Add rubocop-bundle-safe executable Within a bundled project, rubocop is executed via "bundle exec", while outside of a project it's run executed directly. --- bin/rubocop-bundle-safe | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 bin/rubocop-bundle-safe diff --git a/bin/rubocop-bundle-safe b/bin/rubocop-bundle-safe new file mode 100755 index 0000000..4268a49 --- /dev/null +++ b/bin/rubocop-bundle-safe @@ -0,0 +1,7 @@ +#! /usr/bin/env bash + +if bundle check &>/dev/null; then + exec bundle exec rubocop "$@" +else + exec rubocop "$@" +fi