jurplel / install-qt-action

Install Qt on your Github Actions workflows with just one simple action
MIT License
455 stars 78 forks source link

[v4] Add installed tools to path #180

Closed ddalcino closed 9 months ago

ddalcino commented 1 year ago

Fix #157

As discussed in #157, the preferred way to handle this is to append tool paths to the PATH, so that the added paths don't unintentionally override other tools that you're trying to keep in your environment. The tools provided by aqtinstall tend to include a lot of binaries that you may or may not actually need.

Unfortunately, every attempt I have made to append tool paths has failed miserably on Windows. Github toolkit/core provides a convenient and robust method of prepending to the path, and that's what this PR uses, because it works really well. Unfortunately, Github did not provide an equivalent "append to path" method that works on Windows, and nothing I have tried has worked so far.

I am submitting this as a draft because it prepends to the path, rather than appends. Hopefully this will help generate ideas and discussion as to how to move forward.

ddalcino commented 1 year ago

Since this PR would make interface-breaking changes that could easily require users to rewrite their workflows, this PR should not be merged into v3 of the action. This change would need to go into the next major version.

jurplel commented 1 year ago

Might it be reasonable to make this functionality optional (on by default), in case people have PATH issues?

ddalcino commented 1 year ago

Might it be reasonable to make this functionality optional (on by default), in case people have PATH issues?

Yes, that's probably wise.

ddalcino commented 1 year ago

Added parameter add-tools-to-path, default true, with passing test. Link to run where the test failed, before I added a passing implementation, is here: https://github.com/jurplel/install-qt-action/actions/runs/4987188695/jobs/8928708750