summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/flake8.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/flake8.py b/lib/spack/spack/cmd/flake8.py
index 534ab1c4ba..105ede2c70 100644
--- a/lib/spack/spack/cmd/flake8.py
+++ b/lib/spack/spack/cmd/flake8.py
@@ -96,7 +96,11 @@ def changed_files(args):
git = which('git', required=True)
- range = "{0}...".format(args.base)
+ base = args.base
+ if base is None:
+ base = os.environ.get('TRAVIS_BRANCH', 'develop')
+
+ range = "{0}...".format(base)
git_args = [
# Add changed files committed since branching off of develop
@@ -193,7 +197,7 @@ def filter_file(source, dest, output=False):
def setup_parser(subparser):
subparser.add_argument(
- '-b', '--base', action='store', default='develop',
+ '-b', '--base', action='store', default=None,
help="select base branch for collecting list of modified files")
subparser.add_argument(
'-k', '--keep-temp', action='store_true',