Permalink
Browse files

Check ARDUINO_HOME before use on Windows

On Windows ARDUINO_HOME has a default of None but is used to determine
the AVR_HOME. This caused an exception to be thrown before the
ARDUINO_HOME existence check had executed.
  • Loading branch information...
1 parent 517525d commit 937f06418c7744db87bac172603b10bb05aff27e Matthew Murdoch committed Jan 6, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 SConstruct
View
@@ -84,7 +84,8 @@ elif platform == 'win32':
ARDUINO_HOME = resolve_var('ARDUINO_HOME', None)
ARDUINO_PORT = resolve_var('ARDUINO_PORT', '')
SKETCHBOOK_HOME = resolve_var('SKETCHBOOK_HOME', '')
- AVR_HOME = resolve_var('AVR_HOME',
+ if ARDUINO_HOME:
+ AVR_HOME = resolve_var('AVR_HOME',
path.join(ARDUINO_HOME, 'hardware/tools/avr/bin'))
else:
# For Ubuntu Linux (9.10 or higher)

0 comments on commit 937f064

Please sign in to comment.