#1135: Add PowerShell environment initialization - #2232
Conversation
2d5eee9 to
d7bac43
Compare
Coverage Report for CI Build 31004215456Coverage increased (+0.09%) to 72.673%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions86 previously-covered lines in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
There was a problem hiding this comment.
Good job! IMHO this is a nice implementation which adds the functionality requested in #1135. I've ran through your test instructions and everything worked perfectly fine. I have a small suggestion though concerning your method structure. Also you could think about adding tests for the changes you made.
17f9dec to
e019779
Compare
e019779 to
137bc42
Compare
samuelkos17
left a comment
There was a problem hiding this comment.
Thanks for applying my suggestions and writing Unit Tests! However I still think you should change some very minor things. I also suggest that you write an integration test to actually make sure that the file gets modified on disk.
|
|
||
| Release with new features and bugfixes: | ||
|
|
||
| * https://github.com/devonfw/IDEasy/issues/1135[#1135]: IDEasy does not set env variables on Windows PowerShell |
There was a problem hiding this comment.
I think you should mention that you fixed that problem in your changelog message
| private static final String POWERSHELL_SOURCE_FUNCTIONS = | ||
| ". \"$env:IDE_ROOT\\_ide\\installation\\functions.ps1\""; |
There was a problem hiding this comment.
I think defining a own copy of this constant in the test isn't a good practice, since this could be missed if someone changes the folder structure in the future. Why not just make this constant public static final in the implementation?
This PR fixes #1135
Implemented changes:
Testing instructions
Check out the PR branch and build/install IDEasy using the normal local development workflow.
Verify that the PowerShell integration script was installed:
Test-Path "$env:IDE_ROOT\_ide\installation\functions.ps1"The command should return True.
Close all existing PowerShell sessions.
Open a new PowerShell window directly inside an IDEasy project.
Verify that ide is loaded as a PowerShell function:
Get-Command ideThe command type should be Function.
Verify that the IDEasy environment was initialized automatically:
Both variables should contain the values for the current IDEasy project.
Verify that Maven can be executed without running ide first:
mvn --versionVerify manual environment refresh after changing directories:
Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internalChecklist for tool commandlets
Have you added a new
«tool»as commandlet? There are the following additional checks:«tool»«TOOL»_VERSIONand«TOOL»_EDITIONare honored by your commandlet