From d9ef11b56797dbc3a97568259c720de286269a2b Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Tue, 6 Oct 2015 18:14:51 +0900 Subject: [PATCH] move Windows specific command line options into if-clause --- lib/fluent/command/fluentd.rb | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/fluent/command/fluentd.rb b/lib/fluent/command/fluentd.rb index c21fe45cda..e95bc10599 100644 --- a/lib/fluent/command/fluentd.rb +++ b/lib/fluent/command/fluentd.rb @@ -126,17 +126,19 @@ opts[:gem_install_path] = s } -op.on('-x', '--signame INTSIGNAME', "an object name which is used for Windows Service signal (Windows only)") {|s| - opts[:signame] = s -} - -op.on('--reg-winsvc MODE', "install/uninstall as Windows Service. (i: install, u: uninstall) (Windows only)") {|s| - opts[:regwinsvc] = s -} - -op.on('--reg-winsvc-fluentdopt OPTION', "specify fluentd option paramters for Windows Service. (Windows only)") {|s| - opts[:fluentdopt] = s -} +if Fluent.windows? + op.on('-x', '--signame INTSIGNAME', "an object name which is used for Windows Service signal (Windows only)") {|s| + opts[:signame] = s + } + + op.on('--reg-winsvc MODE', "install/uninstall as Windows Service. (i: install, u: uninstall) (Windows only)") {|s| + opts[:regwinsvc] = s + } + + op.on('--reg-winsvc-fluentdopt OPTION', "specify fluentd option paramters for Windows Service. (Windows only)") {|s| + opts[:fluentdopt] = s + } +end (class<