diff --git a/fluent-package/msi/assets/fluentd.bat b/fluent-package/msi/assets/fluentd.bat index d3ca83a87..061497626 100644 --- a/fluent-package/msi/assets/fluentd.bat +++ b/fluent-package/msi/assets/fluentd.bat @@ -6,21 +6,23 @@ if "%~nx0" == "td-agent.bat" ( ) @rem Convert path separator from backslash to forwardslash -setlocal enabledelayedexpansion -set FLUENT_PACKAGE_TOPDIR=!FLUENT_PACKAGE_TOPDIR:\=/! +set FLUENT_PACKAGE_TOPDIR=%FLUENT_PACKAGE_TOPDIR:\=/% set PATH=%FLUENT_PACKAGE_TOPDIR%bin;%PATH% set PATH=%FLUENT_PACKAGE_TOPDIR%;%PATH% -set "FLUENT_CONF=%FLUENT_PACKAGE_TOPDIR%/etc/fluent/fluentd.conf" -set "FLUENT_PLUGIN=%FLUENT_PACKAGE_TOPDIR%/etc/fluent/plugin" -set "FLUENT_PACKAGE_VERSION=%FLUENT_PACKAGE_TOPDIR%/bin/fluent-package-version.rb" +set "FLUENT_CONF=%FLUENT_PACKAGE_TOPDIR%etc/fluent/fluentd.conf" +set "FLUENT_PLUGIN=%FLUENT_PACKAGE_TOPDIR%etc/fluent/plugin" + +setlocal +set "FLUENT_PACKAGE_VERSION=%FLUENT_PACKAGE_TOPDIR%bin/fluent-package-version.rb" for %%p in (%*) do ( if "%%p"=="--version" ( ruby "%FLUENT_PACKAGE_VERSION%" goto last ) ) -"%FLUENT_PACKAGE_TOPDIR%/bin/fluentd" %* endlocal +"%FLUENT_PACKAGE_TOPDIR%bin/fluentd" %* + :last