Skip to content

Commit

Permalink
Code fomatting + logging tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarlesky committed Jan 3, 2024
1 parent bcd237f commit 06baa49
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
12 changes: 9 additions & 3 deletions lib/ceedling/configurator_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def validate_executable_filepath(config, *keys)

# skip everything if we've got an argument replacement pattern
return true if (filepath =~ TOOL_EXECUTOR_ARGUMENT_REPLACEMENT_PATTERN)

# if there's no path included, verify file exists somewhere in system search paths
if (not filepath.include?('/'))
exists = false
Expand All @@ -128,15 +128,21 @@ def validate_executable_filepath(config, *keys)

if (not exists)
# no verbosity checking since this is lowest level anyhow & verbosity checking depends on configurator
@stream_wrapper.stderr_puts("ERROR: Config filepath #{format_key_sequence(keys, hash[:depth])}['#{filepath}'] does not exist in system search paths.")
@stream_wrapper.stderr_puts(
"ERROR: Config filepath #{format_key_sequence(keys, hash[:depth])}['#{filepath}'] does not exist in system search paths.",
Verbosity::COMPLAIN
)
return false
end

# if there is a path included, check that explicit filepath exists
else
if (not @file_wrapper.exist?(filepath))
# no verbosity checking since this is lowest level anyhow & verbosity checking depends on configurator
@stream_wrapper.stderr_puts("ERROR: Config filepath #{format_key_sequence(keys, hash[:depth])}['#{filepath}'] does not exist on disk.")
@stream_wrapper.stderr_puts(
"ERROR: Config filepath #{format_key_sequence(keys, hash[:depth])}['#{filepath}'] does not exist on disk.",
Verbosity::COMPLAIN
)
return false
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/ceedling/system_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ def shell_system(command:, args:[], verbose:false, boom:false)

if verbose
# Allow console output
result = system( command, *args)
result = system( command, *args )
else
# Shush the console output
result = system( command, *args, [:out, :err] => File::NULL)
result = system( command, *args, [:out, :err] => File::NULL )
end

$exit_code = ($?.exitstatus).freeze if boom
Expand Down
2 changes: 1 addition & 1 deletion plugins/gcov/lib/gcov.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def utility_enabled?(opts, utility_name)
)

if exec[:result].nil?
raise CeedlingException.new("ERROR: gcov report generation tool `#{utility_name}` not installed.")
raise CeedlingException.new("gcov report generation tool `#{utility_name}` not installed.")
end
end

Expand Down

0 comments on commit 06baa49

Please sign in to comment.