From 9f3244e884ea61573034357e03e9b42335c63397 Mon Sep 17 00:00:00 2001 From: mreid Date: Tue, 24 Feb 2009 18:10:51 +1100 Subject: [PATCH] Fixed bug which meant config file did not override default source and destination --- bin/jekyll | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/jekyll b/bin/jekyll index 9a0646d7..48264f99 100755 --- a/bin/jekyll +++ b/bin/jekyll @@ -62,17 +62,17 @@ end opts.parse! # Temporarily set source and destination options to read in config file -options['source'] = Jekyll::DEFAULTS['source'] -options['destination'] = Jekyll::DEFAULTS['destination'] +source = Jekyll::DEFAULTS['source'] +destination = Jekyll::DEFAULTS['destination'] # Get source and destintation from command line case ARGV.size when 0 when 1 - options['destination'] = ARGV[0] + destination = options['destination'] = ARGV[0] when 2 - options['source'] = ARGV[0] - options['destination'] = ARGV[1] + source = options['source'] = ARGV[0] + destination = options['destination'] = ARGV[1] else puts "Invalid options. Run `jekyll --help` for assistance." exit(1) @@ -80,7 +80,7 @@ end # Get configuration from /_config.yaml config = {} -config_file = File.join(options['source'], '_config.yaml') +config_file = File.join(source, '_config.yaml') begin config = YAML.load_file( config_file ) puts "Configuration from #{config_file}"