Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: ppapi/generators/generator.py

Issue 9168014: Fix incorrectly resolved conflict, and add error message for missing sources. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/generators/idl_c_header.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/generators/generator.py
===================================================================
--- ppapi/generators/generator.py (revision 117045)
+++ ppapi/generators/generator.py (working copy)
@@ -3,6 +3,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import os
import sys
# Note: some of these files are imported to register cmdline options.
@@ -16,10 +17,18 @@
def Main():
args = sys.argv[1:]
- # If no arguments are provided, assume we are tring to rebuild the
+ # If no arguments are provided, assume we are trying to rebuild the
# C headers with warnings off.
if not args:
args = ['--wnone', '--cgen', '--range=start,end']
+ current_dir = os.path.abspath(os.getcwd())
+ script_dir = os.path.abspath(os.path.dirname(__file__))
+ if current_dir != script_dir:
+ print '\nIncorrect CWD, default run skipped.'
+ print 'When running with no arguments set CWD to the scripts directory:'
+ print '\t' + script_dir + '\n'
+ print 'This ensures correct default paths and behavior.\n'
+ return 1
filenames = ParseOptions(args)
ast = ParseFiles(filenames)
« no previous file with comments | « no previous file | ppapi/generators/idl_c_header.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698