Pash-Project / Pash

An Open Source reimplementation of Windows PowerShell, for Mono.
https://groups.google.com/group/pash-project
BSD 3-Clause "New" or "Revised" License
516 stars 54 forks source link

Fix passing string variable to an external application. #404

Closed aheubusch closed 8 years ago

aheubusch commented 8 years ago

I was a bit hasty with my previous PR (#398). Do you guys know of any other type that implements IEnumerable but isn't really a collection of items?

ForNeVeR commented 8 years ago

We have a test failure:

TestHost.FileSystemTests.ShellExecutionTest.WinFileShouldBeExecutedFromSystemPath("file.bat","123","file")
     Expected string length 3 but was 0. Strings differ at index 0.
  Expected: "123"
  But was:  <string.Empty>
ForNeVeR commented 8 years ago

I don't know the context of this change (will check later), but I fear that you may now have some StringConstant instead of a string after my recent changes in the parameter passing code (see #397). If that is the case, then please notify me, and I'll take a closer look at these changes and how we could change either my or yours code to mitigate the issue.

aheubusch commented 8 years ago

As far as I can tell your changes are not related to the failing test. Locally the test executes fine. Maybe its something on the CI server?

ForNeVeR commented 8 years ago

Well, that's interesting. This test was written by me and I can confirm that it executes in my local environment after applying this pull request. Could someone of the project owners restart the build on AppVeyor?

cc @JayBazuzi

JayBazuzi commented 8 years ago

Restarted.

-J

On Sat, Dec 12, 2015 at 9:25 PM, Friedrich von Never < notifications@github.com> wrote:

Well, that's interesting. This test was written by me and I can confirm that it executes in my local environment after applying this pull request. Could someone of the project owners restart the build on AppVeyor?

cc @JayBazuzi https://github.com/JayBazuzi

— Reply to this email directly or view it on GitHub https://github.com/Pash-Project/Pash/pull/404#issuecomment-164228207.

ForNeVeR commented 8 years ago

Still fails. I'll add Appveyor to my personal repo and make some experiments later. We need to fix that. I think that may be related to the changes in CatchCommandResult method, but still cannot reproduce that.

ForNeVeR commented 8 years ago

It seems to me that it's appveyor local problem. Currently our master branch fails at my Appveyor instance: https://ci.appveyor.com/project/ForNeVeR/pash/build/1.0.2

It means that there's something wrong with Appveyor or with our test.

aheubusch commented 8 years ago

My guess is we resolve file incorrectly in CommandManager.ResolveAbsolutePath. Its possible we find a file.exe before the intended file.bat.

ForNeVeR commented 8 years ago

Thanks for your investigation!