mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
Fix: defaults should be defaults and not override parsed settings.
This commit is contained in:
parent
958e3faf94
commit
b17611f2db
1 changed files with 4 additions and 6 deletions
|
@ -405,12 +405,6 @@ class ImportScripts::Smf2 < ImportScripts::Base
|
|||
class Error < StandardError ; end
|
||||
class SettingsError < Error ; end
|
||||
|
||||
def initialize
|
||||
self.host = 'localhost'
|
||||
self.username = Etc.getlogin
|
||||
self.prefix = 'smf_'
|
||||
end
|
||||
|
||||
def parse!(args = ARGV)
|
||||
raise Error, 'not enough arguments' if ARGV.empty?
|
||||
begin
|
||||
|
@ -421,6 +415,10 @@ class ImportScripts::Smf2 < ImportScripts::Base
|
|||
raise Error, 'too many arguments' if args.length > 1
|
||||
self.smfroot = args.first
|
||||
read_smf_settings if self.smfroot
|
||||
|
||||
self.host ||= 'localhost'
|
||||
self.username ||= Etc.getlogin
|
||||
self.prefix ||= 'smf_'
|
||||
end
|
||||
|
||||
def usage
|
||||
|
|
Loading…
Reference in a new issue