Skip to content

Commit

Permalink
Do not log getent services command execution
Browse files Browse the repository at this point in the history
Because its output is too long, now the `logger: nil` option is passed to
Yast::Execute in order to use the Cheetah::NullRecorder[1].

[1] https://github.com/openSUSE/cheetah/blob/bafcf46680fba6cc3fa3e60498d2f1d2b741d6e3/lib/cheetah.rb#L129
  • Loading branch information
dgdavid committed Mar 6, 2020
1 parent 6ab5c6c commit 492162c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/network/src/modules/PortAliases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ def services
#
# @return [Array<String>] list of available services
def services_database
Yast::Execute.stdout.on_target!("/usr/bin/getent", "services").lines
# Log nothing from this command because its long output (logger: nil)
Yast::Execute.stdout.on_target!("/usr/bin/getent", "services", logger: nil).lines
end

# Convenience method to easily find a loaded service by alias
Expand Down

0 comments on commit 492162c

Please sign in to comment.