Skip to content

Commit

Permalink
msi: quote path which contains space
Browse files Browse the repository at this point in the history
Path must be quoted correctly when it contains space.

e.g. c:\Dummy Program Files (FOO)\fluent...

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
  • Loading branch information
kenhys committed Sep 15, 2023
1 parent ec006bd commit bca8ebf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fluent-package/msi/assets/fluentd.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@echo off
if "%~nx0" == "td-agent.bat" (
set FLUENT_PACKAGE_TOPDIR=%~dp0..\
set "FLUENT_PACKAGE_TOPDIR=%~dp0..\"
) else (
set FLUENT_PACKAGE_TOPDIR=%~dp0
set "FLUENT_PACKAGE_TOPDIR=%~dp0"
)

@rem Convert path separator from backslash to forwardslash
Expand All @@ -11,12 +11,12 @@ 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"
set FLUENT_PACKAGE_VERSION="%FLUENT_PACKAGE_TOPDIR%/bin/fluent-package-version.rb"
for %%p in (%*) do (
if "%%p"=="--version" (
ruby "%FLUENT_PACKAGE_VERSION%"
ruby %FLUENT_PACKAGE_VERSION%
goto last
)
)
Expand Down

0 comments on commit bca8ebf

Please sign in to comment.