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: fix wrong env path for Fluent Package Prompt #606

Merged

Conversation

daipom
Copy link
Contributor

@daipom daipom commented Dec 12, 2023

@daipom
Copy link
Contributor Author

daipom commented Dec 12, 2023

I will check the behavior with the package built on the CI.

@kenhys
Copy link
Contributor

kenhys commented Dec 12, 2023

NOTE: Additionally, %~dp0\bin expanded to c:\fluent\\bin for example, so there
is no need to add path separator for it.

diff --git a/fluent-package/msi/assets/fluent-package-prompt.bat b/fluent-package/msi/assets/fluent-package-prompt.bat
index 96ec212..077877e 100644
--- a/fluent-package/msi/assets/fluent-package-prompt.bat
+++ b/fluent-package/msi/assets/fluent-package-prompt.bat
@@ -1,4 +1,4 @@
 @echo off
-set "PATH=%~dp0\bin;%PATH%"
+set "PATH=%~dp0bin;%PATH%"
 set "PATH=%~dp0;%PATH%"
 title Fluent Package Command Prompt
-- 
2.43.0

@daipom
Copy link
Contributor Author

daipom commented Dec 12, 2023

NOTE: Additionally, %~dp0\bin expanded to c:\fluent\\bin for example, so there is no need to add path separator for it.

diff --git a/fluent-package/msi/assets/fluent-package-prompt.bat b/fluent-package/msi/assets/fluent-package-prompt.bat
index 96ec212..077877e 100644
--- a/fluent-package/msi/assets/fluent-package-prompt.bat
+++ b/fluent-package/msi/assets/fluent-package-prompt.bat
@@ -1,4 +1,4 @@
 @echo off
-set "PATH=%~dp0\bin;%PATH%"
+set "PATH=%~dp0bin;%PATH%"
 set "PATH=%~dp0;%PATH%"
 title Fluent Package Command Prompt
-- 
2.43.0

Thanks! I see! I will add it.

@daipom
Copy link
Contributor Author

daipom commented Dec 13, 2023

NOTE: Additionally, %~dp0\bin expanded to c:\fluent\\bin for example, so there is no need to add path separator for it.

diff --git a/fluent-package/msi/assets/fluent-package-prompt.bat b/fluent-package/msi/assets/fluent-package-prompt.bat
index 96ec212..077877e 100644
--- a/fluent-package/msi/assets/fluent-package-prompt.bat
+++ b/fluent-package/msi/assets/fluent-package-prompt.bat
@@ -1,4 +1,4 @@
 @echo off
-set "PATH=%~dp0\bin;%PATH%"
+set "PATH=%~dp0bin;%PATH%"
 set "PATH=%~dp0;%PATH%"
 title Fluent Package Command Prompt
-- 
2.43.0

Thanks! I see! I will add it.

I will fix this in another PR after this PR is merged because this is not related to #605.

@daipom
Copy link
Contributor Author

daipom commented Dec 13, 2023

I have confirmed the msi package works correctly.

@daipom daipom marked this pull request as ready for review December 13, 2023 02:33
@daipom daipom requested a review from kenhys December 13, 2023 02:33
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.

The fixed content itself is reasonable, but it lacks the reason "why".

  • PATH was set to "c:\opt\fluent";"c:\opt\fluent\bin";...
  • There is a case that some tool can't spawn td-agent-gem correctly when PATH contains quoted literals...
  • In this commit...

Could you amend commit message?

* fix fluent#605
* The current PATH includes `"`. It is unintended and causes some
  bugs. For example, fluent-diagtool does not work correctly
  because of this.

Signed-off-by: Daijiro Fukuda <[email protected]>
@daipom daipom force-pushed the msi-fluent-package-prompt-fix-wrong-env-path branch from dcae05e to e6a7403 Compare December 13, 2023 03:53
@daipom
Copy link
Contributor Author

daipom commented Dec 13, 2023

The fixed content itself is reasonable, but it lacks the reason "why".

* PATH was set to "c:\opt\fluent";"c:\opt\fluent\bin";...

* There is a case that some tool can't spawn td-agent-gem correctly when  PATH contains quoted literals...

* In this commit...

Could you amend commit message?

Thanks for your review. I have added it.

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.

@kenhys kenhys merged commit d6e487a into fluent:master Dec 13, 2023
22 checks passed
@daipom daipom deleted the msi-fluent-package-prompt-fix-wrong-env-path branch December 13, 2023 04:30
@daipom daipom added this to the 5.0.3 milestone Feb 21, 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.

msi: Env var PATH for Fluent Package Prompt are specified in a not good way
2 participants