set "PATH=%~dp0\bin;%PATH%"
set "PATH=%~dp0;%PATH%"
In the current implementation, PATH is
Path="C:\opt\fluent\";"C:\opt\fluent\\bin";...
For some reason, this is not an issue on this prompt.
However, it causes some other executions behavior wrong.
For example, I can't run fluent-diagtool correctly because of this.
It appears that Open3 can not handle this PATH style (including ").
Fluent Command Prompt with administrative privileges:
$ fluent-diagtool -o /opt
2023-12-08 10:22:36 +0900: [Diagtool] [INFO] Parsing command options...
2023-12-08 10:22:36 +0900: [Diagtool] [INFO] Option : Output directory = /opt
2023-12-08 10:22:36 +0900: [Diagtool] [INFO] Initializing parameters...
2023-12-08 10:22:36 +0900: [Diagtool] [INFO] [Collect] Collecting fluent-package gem information...
C:/opt/fluent/lib/ruby/3.2.0/open3.rb:222:in `spawn': No such file or directory - fluent-gem list (Errno::ENOENT)
from C:/opt/fluent/lib/ruby/3.2.0/open3.rb:222:in `popen_run'
from C:/opt/fluent/lib/ruby/3.2.0/open3.rb:103:in `popen3'
from C:/opt/fluent/lib/ruby/3.2.0/open3.rb:290:in `capture3'
from C:/opt/fluent/lib/ruby/gems/3.2.0/gems/fluent-diagtool-1.0.3/lib/fluent/diagtool/collectutils.rb:464:in `collect_tdgems'
from C:/opt/fluent/lib/ruby/gems/3.2.0/gems/fluent-diagtool-1.0.3/lib/fluent/diagtool/windows/diagutils.rb:50:in `run_diagtool'
from C:/opt/fluent/lib/ruby/gems/3.2.0/gems/fluent-diagtool-1.0.3/exe/fluent-diagtool:41:in `<top (required)>'
from C:/opt/fluent/bin/fluent-diagtool:32:in `load'
from C:/opt/fluent/bin/fluent-diagtool:32:in `<main>'
https://github.com/fluent/fluent-package-builder/blob/b793ab1d9632d66b14d19a3c302332bf1237c11d/fluent-package/msi/assets/fluent-package-prompt.bat#L2-L3
This should be
In the current implementation,
PATH
isFor some reason, this is not an issue on this prompt. However, it causes some other executions behavior wrong. For example, I can't run
fluent-diagtool
correctly because of this. It appears thatOpen3
can not handle this PATH style (including"
).Fluent Command Prompt with administrative privileges: