Hello,

The current git HEAD fails to load issue_dir from the configuration
file.  This is due to the command line parser setting a default value
for issue_dir that always masks the specified name in config.issue_dir.
This results in ditz always trying to use ".ditz" as the issue_dir.

The attached patch removes the default issue_dir value from opts.  When
issue_dir is not specified on the command line nor in a users
configuration file, it falls back to using the ".ditz" directory.

Hope this helps,
-Roy
---
 bin/ditz |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ditz b/bin/ditz
index 04bc7a6..aa2b222 100755
--- a/bin/ditz
+++ b/bin/ditz
@@ -39,7 +39,7 @@ See 'ditz help' for a list of commands.
 Global options are:
 EOS
 
-  opt :issue_dir, "Issue database dir", :default => ".ditz"
+  opt :issue_dir, "Issue database dir", :type => :string
   opt :config_file, "Configuration file", :default => File.join(config_dir || ".", CONFIG_FN)
   opt :plugins_file, "Plugins file", :default => File.join(plugin_dir || ".", PLUGIN_FN)
   opt :verbose, "Verbose output", :default => false
@@ -125,7 +125,7 @@ end
 ## configure any lowline settings
 Lowline.use_editor_if_possible = config.use_editor_if_possible
 
-issue_dir = Pathname.new($opts[:issue_dir] || config.issue_dir)
+issue_dir = Pathname.new($opts[:issue_dir] || config.issue_dir || ".ditz")
 cmd = ARGV.shift || "todo"
 unless op.has_operation? cmd
   die "no such command: #{cmd}"
-- 
1.6.0.4

_______________________________________________
ditz-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ditz-talk

Reply via email to