Warn if --gclientfile= specifies a with separators.

Given that we search for the gclient root in ancestor directories based on the file name, specifying a file with separators doesn't make a lot of sense.

BUG=336946
R=iannucci@chromium.org

Review URL: https://codereview.chromium.org/150633004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@249077 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
rdsmith@chromium.org 11 years ago
parent 130a5c4cb3
commit d9591f03f5

@ -1860,6 +1860,9 @@ class OptionParser(optparse.OptionParser):
format='%(module)s(%(lineno)d) %(funcName)s:%(message)s') format='%(module)s(%(lineno)d) %(funcName)s:%(message)s')
if options.config_filename and options.spec: if options.config_filename and options.spec:
self.error('Cannot specifiy both --gclientfile and --spec') self.error('Cannot specifiy both --gclientfile and --spec')
if (options.config_filename and
options.config_filename != os.path.basename(options.config_filename)):
self.error('--gclientfile target must be a filename, not a path')
if not options.config_filename: if not options.config_filename:
options.config_filename = self.gclientfile_default options.config_filename = self.gclientfile_default
options.entries_filename = options.config_filename + '_entries' options.entries_filename = options.config_filename + '_entries'

Loading…
Cancel
Save