Skip to content

Commit 2d9373e

Browse files
committed
- Fix validation when using split config
1 parent 1dc57c5 commit 2d9373e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

lib/bashly/commands/preview.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module Bashly
22
module Commands
33
class Preview < Base
4+
using ComposeRefinements
5+
46
help "Generate the bash script to STDOUT"
57

68
usage "bashly preview"
@@ -9,7 +11,7 @@ class Preview < Base
911
environment "BASHLY_SOURCE_DIR", "The path containing the bashly configuration and source files [default: src]"
1012

1113
def run
12-
config = Config.new "#{Settings.source_dir}/bashly.yml"
14+
config = Config.new("#{Settings.source_dir}/bashly.yml").compose
1315
command = Script::Command.new(config)
1416
script = Script::Wrapper.new command
1517
puts script.code

lib/bashly/commands/validate.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module Bashly
22
module Commands
33
class Validate < Base
4+
using ComposeRefinements
5+
46
help "Scan the configuration file for errors"
57

68
usage "bashly validate"
@@ -9,7 +11,7 @@ class Validate < Base
911
environment "BASHLY_SOURCE_DIR", "The path containing the bashly configuration and source files [default: src]"
1012

1113
def run
12-
config = Config.new "#{Settings.source_dir}/bashly.yml"
14+
config = Config.new("#{Settings.source_dir}/bashly.yml").compose
1315
validator = ConfigValidator.new config
1416
validator.validate
1517
say "!txtgrn!OK"

lib/bashly/libraries/completions.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
module Bashly
22
module Libraries
33
class Completions < Base
4+
using ComposeRefinements
5+
46
protected
57
def command
68
@command ||= Script::Command.new config
79
end
810

911
def config
10-
@config ||= Bashly::Config.new "#{Settings.source_dir}/bashly.yml"
12+
@config ||= Bashly::Config.new("#{Settings.source_dir}/bashly.yml").compose
1113
end
1214
end
1315
end

0 commit comments

Comments
 (0)