Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msi: refactor exectuion bat files #647

Merged
merged 1 commit into from
Jun 27, 2024
Merged

Conversation

daipom
Copy link
Contributor

@daipom daipom commented Jun 25, 2024

  • Add entire local scope to prevent changing global env vars
  • Remove unnecessary enabledelayedexpansion
  • Remove unnecessary /

fluentd.bat

Before: FLUENT_PACKAGE_VERSION was passed to Fluentd process.
After: FLUENT_PACKAGE_VERSION is not passed to Fluentd process.

fluent-gem.bat

Previously, it changed the environment variables unintentionally.

Before

> ruby -e "ENV['PATH'].split(';').select{|v| v.include?('fluent')}.map{|v| p v}"
"C:\\opt\\fluent\\"
"C:\\opt\\fluent\\bin"

> fluent-gem --version
3.4.19

> ruby -e "ENV['PATH'].split(';').select{|v| v.include?('fluent')}.map{|v| p v}"
"C:\\opt\\fluent\\bin"
"C:\\opt\\fluent\\"
"C:\\opt\\fluent\\bin"

After

> ruby -e "ENV['PATH'].split(';').select{|v| v.include?('fluent')}.map{|v| p v}"
"C:\\opt\\fluent\\"
"C:\\opt\\fluent\\bin"

> fluent-gem --version
3.4.19

> ruby -e "ENV['PATH'].split(';').select{|v| v.include?('fluent')}.map{|v| p v}"
"C:\\opt\\fluent\\"
"C:\\opt\\fluent\\bin"

* Add entire local scope to prevent changing global env vars
* Remove unnecessary enabledelayedexpansion
* Remove unnecessary `/`

Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
@daipom daipom force-pushed the msi-refactor-fluentd-bat branch from ce3fbf3 to 6002cf4 Compare June 27, 2024 01:39
@daipom daipom changed the title msi: refactor fluentd.bat msi: refactor exectuion bat files Jun 27, 2024
Copy link
Contributor

@kenhys kenhys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I've overlooked these variable scopes.

@kenhys kenhys merged commit efb8897 into master Jun 27, 2024
62 of 63 checks passed
@kenhys kenhys deleted the msi-refactor-fluentd-bat branch June 27, 2024 02:26
@kenhys kenhys added this to the 5.0.4 (T.B.D.) milestone Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants