-
Notifications
You must be signed in to change notification settings - Fork 102
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
PowerShell support broken #198
Comments
I fixed the path to |
OK. Seems as if the variable resolution does not work anymore. We should go for
When I call
Please note that if I update the working echo statements, I get the updated output so it is for sure I am editing the right file that is also called from powershell. |
I outcommented every single statement in the problematic if. |
Is somebody keen on implementing and maintaining a |
#178: also use reg import for uninstall avoiding admin rights #191: fixed conflict with repo and shared software #198: power-shell improvement #199: also remove devon.bat on uninstall #200: update installed devon[.bat] if newer #202: fixed version compare and added tests #203: workaround as cp -u is not working on MacOS
I found another bug and I assume this could never ever have worked before: |
Sourcing is supported by powershell: However, Sorry to say so, but powershell is broken. Maybe it is because windows 10 comes with powershell 1.0 while version 6 is already out. But this entirely sucks and I am giving up. It seems that some windows fan who is keen on powershell support would need to take over.
|
So all tricky and nothing working as expected with powershell.
Is giving this output:
There are really nice concepts in PowerShell but I am facing too many drawbacks here. I think it is a good move that Microsoft deeply integrates bash, ssh and the entire linux subsystem as well as docker into windows. I will therefore focus on bash and leave powershell support open to some drivers who really want to have this feature. I will do a minimum fix now and are done. BTW:
So if someone wants to take over, he would have to figure out via which variables one can figure out where to put or find |
So with PR #208 I created a minimum fix so powershell is working in general. It will be included in bat16 release. Feel free to create a |
For the moment just a few additional hints:
In summary this results in a command like this Some topics are still open though:
And besides the missing topics all this will of course not solve the fundamental issue, that the original concept of devonfw-ide - Run a command inside the current whatever shell to initialize path and other environment so it matches with the current devon instance - will not work without some native powershell scripting. This were IMHO far too much work. It would be easier, if there were introduced another subcommand like "devon init´powershell" or alike, that would start another powershell process window in such a case with the potentially modified environment. The devonfw approach to use a pure - argument free - "devon" for the same is unusual - compared to other sdk CLI commands - and is IMHO the root cause for the need of different hacks here. |
@markusschuh Thanks for your experts input that is always extremely helpful. 👍 The advantage of the
So what you are saying with your second However, first I will try without absolute path and variable via reg file. What is great about your fix is that then power-shell comes back up shiny in the used layout so people really notice the difference between power-shell and CMD. |
So for
Power-shell then works but like before looks like CMD. |
Ah, I see. The look & feel just comes from the |
OK, fixed.
I think I am now getting why: So IMHO we would need to figure out if we are running in power-shell at this code-line and if so then do not use |
source seems to be an internal function of power-shell that can not be used from
So in other words we could only re-implement |
My last try way:
So I am giving up. |
Improved with PR #221 |
I am not sure if it is related to #178 but now PowerShell integration (
Open Devon PowerShell here
) stopped working.When I click on it, I get this error message in a Popup:
The text was updated successfully, but these errors were encountered: