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

Linux support #35

Closed
felixfbecker opened this Issue Nov 8, 2017 · 10 comments

Comments

Projects
None yet
2 participants
@felixfbecker
Collaborator

felixfbecker commented Nov 8, 2017

Just opening this to to track it.

@aaronpowell

This comment has been minimized.

Show comment
Hide comment
@aaronpowell

aaronpowell Nov 8, 2017

Owner

I was just starting to look at that 😉.

Get a bunch of errors like this:

        PSArgumentException: Cannot process argument because the value of argument "version" is not valid. Change the value of the "version" argument and run the operation again.
        PSInvalidCastException: Cannot convert value "5.0.10586.122" to type "System.Management.Automation.SemanticVersion". Error: "Cannot process argument because the value of argument "version" is not valid. Change the value of the "version" argument and run the operation again."
        RuntimeException: Could not compare "6.0.0-beta.9" to "5.0.10586.122". Error: "Cannot convert value "5.0.10586.122" to type "System.Management.Automation.SemanticVersion". Error: "Cannot process argument because the value of argument "version" is not valid. Change the value of the "version" argument and run the operation again.""
        CmdletInvocationException: Could not compare "6.0.0-beta.9" to "5.0.10586.122". Error: "Cannot convert value "5.0.10586.122" to type "System.Management.Automation.SemanticVersion". Error: "Cannot process argument because the value of argument "version" is not valid. Change the value of the "version" argument and run the operation again.""
        ParameterBindingException: Cannot retrieve the dynamic parameters for the cmdlet. Could not compare "6.0.0-beta.9" to "5.0.10586.122". Error: "Cannot convert value "5.0.10586.122" to type "System.Management.Automation.SemanticVersion". Error: "Cannot process argument because the value of argument "version" is not valid. Change the value of the "version" argument and run the operation again.""
        at IsMac, /src/nvm.psm1: line 6
        at Set-NodeVersion, /src/nvm.psm1: line 88
        at <ScriptBlock>, /src/nvm.tests.ps1: line 180
        at Invoke-Test, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/It.ps1: line 258
        at ItImpl, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/It.ps1: line 207
        at It, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/It.ps1: line 121
        at <ScriptBlock>, /src/nvm.tests.ps1: line 179
        at DescribeImpl, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/Describe.ps1: line 161
        at Context, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/Context.ps1: line 72
        at <ScriptBlock>, /src/nvm.tests.ps1: line 176
        at InModuleScope, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/InModuleScope.ps1: line 84
        at <ScriptBlock>, /src/nvm.tests.ps1: line 161
        at DescribeImpl, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/Describe.ps1: line 161
        at Describe, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/Describe.ps1: line 84
        at <ScriptBlock>, /src/nvm.tests.ps1: line 160
        at <ScriptBlock>, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Pester.psm1: line 802
        at Invoke-Pester<End>, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Pester.psm1: line 817
        at <ScriptBlock>, <No file>: line 1
Owner

aaronpowell commented Nov 8, 2017

I was just starting to look at that 😉.

Get a bunch of errors like this:

        PSArgumentException: Cannot process argument because the value of argument "version" is not valid. Change the value of the "version" argument and run the operation again.
        PSInvalidCastException: Cannot convert value "5.0.10586.122" to type "System.Management.Automation.SemanticVersion". Error: "Cannot process argument because the value of argument "version" is not valid. Change the value of the "version" argument and run the operation again."
        RuntimeException: Could not compare "6.0.0-beta.9" to "5.0.10586.122". Error: "Cannot convert value "5.0.10586.122" to type "System.Management.Automation.SemanticVersion". Error: "Cannot process argument because the value of argument "version" is not valid. Change the value of the "version" argument and run the operation again.""
        CmdletInvocationException: Could not compare "6.0.0-beta.9" to "5.0.10586.122". Error: "Cannot convert value "5.0.10586.122" to type "System.Management.Automation.SemanticVersion". Error: "Cannot process argument because the value of argument "version" is not valid. Change the value of the "version" argument and run the operation again.""
        ParameterBindingException: Cannot retrieve the dynamic parameters for the cmdlet. Could not compare "6.0.0-beta.9" to "5.0.10586.122". Error: "Cannot convert value "5.0.10586.122" to type "System.Management.Automation.SemanticVersion". Error: "Cannot process argument because the value of argument "version" is not valid. Change the value of the "version" argument and run the operation again.""
        at IsMac, /src/nvm.psm1: line 6
        at Set-NodeVersion, /src/nvm.psm1: line 88
        at <ScriptBlock>, /src/nvm.tests.ps1: line 180
        at Invoke-Test, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/It.ps1: line 258
        at ItImpl, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/It.ps1: line 207
        at It, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/It.ps1: line 121
        at <ScriptBlock>, /src/nvm.tests.ps1: line 179
        at DescribeImpl, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/Describe.ps1: line 161
        at Context, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/Context.ps1: line 72
        at <ScriptBlock>, /src/nvm.tests.ps1: line 176
        at InModuleScope, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/InModuleScope.ps1: line 84
        at <ScriptBlock>, /src/nvm.tests.ps1: line 161
        at DescribeImpl, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/Describe.ps1: line 161
        at Describe, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Functions/Describe.ps1: line 84
        at <ScriptBlock>, /src/nvm.tests.ps1: line 160
        at <ScriptBlock>, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Pester.psm1: line 802
        at Invoke-Pester<End>, /opt/microsoft/powershell/6.0.0-beta.9/Modules/Pester/4.0.8/Pester.psm1: line 817
        at <ScriptBlock>, <No file>: line 1
@aaronpowell

This comment has been minimized.

Show comment
Hide comment
@aaronpowell

aaronpowell Nov 8, 2017

Owner

Currently I'm trying to create a Docker image that runs PowerShell + VSCode so I can start the debugger on there and debug the PowerShell. That seems easier than debugging via the remote debugger!

Owner

aaronpowell commented Nov 8, 2017

Currently I'm trying to create a Docker image that runs PowerShell + VSCode so I can start the debugger on there and debug the PowerShell. That seems easier than debugging via the remote debugger!

@felixfbecker

This comment has been minimized.

Show comment
Hide comment
@felixfbecker

felixfbecker Nov 8, 2017

Collaborator

You could also just use WSL

Collaborator

felixfbecker commented Nov 8, 2017

You could also just use WSL

@aaronpowell

This comment has been minimized.

Show comment
Hide comment
@aaronpowell

aaronpowell Nov 8, 2017

Owner

Still don't think you can debug can you?

Owner

aaronpowell commented Nov 8, 2017

Still don't think you can debug can you?

@felixfbecker

This comment has been minimized.

Show comment
Hide comment
@felixfbecker

felixfbecker Nov 8, 2017

Collaborator

Is there a reason why that wouldn't work?

If you push your WIP on a branch I can change the travis.yml to include Linux

Collaborator

felixfbecker commented Nov 8, 2017

Is there a reason why that wouldn't work?

If you push your WIP on a branch I can change the travis.yml to include Linux

@aaronpowell

This comment has been minimized.

Show comment
Hide comment
@aaronpowell

aaronpowell Nov 8, 2017

Owner

It's more I'm not sure how to setup remote debugging of PowerShell under WSL than it not working.

Currently I don't have a WIP branch, I'm first struggling to work out where that error is actually coming from.

Owner

aaronpowell commented Nov 8, 2017

It's more I'm not sure how to setup remote debugging of PowerShell under WSL than it not working.

Currently I don't have a WIP branch, I'm first struggling to work out where that error is actually coming from.

@felixfbecker

This comment has been minimized.

Show comment
Hide comment
@felixfbecker

felixfbecker Nov 8, 2017

Collaborator

I think I was wrong. I remember having that setup to debug gcc-compiled Linux C++ code by pointing the runtime at bash -c, but the PowerShell debugger doesn't seem to have a similar option.

Collaborator

felixfbecker commented Nov 8, 2017

I think I was wrong. I remember having that setup to debug gcc-compiled Linux C++ code by pointing the runtime at bash -c, but the PowerShell debugger doesn't seem to have a similar option.

@aaronpowell

This comment has been minimized.

Show comment
Hide comment
@aaronpowell

aaronpowell Nov 9, 2017

Owner

So it looks like support for getting tests running on Linux is blocked by the pester/Pester#925 within Pester, which we already pull down to fix OSX issues.

Now it's just a case of getting the install to actually work 😛. But that should be simple.

Owner

aaronpowell commented Nov 9, 2017

So it looks like support for getting tests running on Linux is blocked by the pester/Pester#925 within Pester, which we already pull down to fix OSX issues.

Now it's just a case of getting the install to actually work 😛. But that should be simple.

@felixfbecker

This comment has been minimized.

Show comment
Hide comment
@felixfbecker

felixfbecker Nov 13, 2017

Collaborator

@aaronpowell could you push your WIP?

Collaborator

felixfbecker commented Nov 13, 2017

@aaronpowell could you push your WIP?

@aaronpowell

This comment has been minimized.

Show comment
Hide comment
@aaronpowell

aaronpowell Nov 13, 2017

Owner

I haven't actually done any work on this, I was just trying to find out what the cause of the test failures was, and given it was in Pester I didn't actually have to change any code.

Owner

aaronpowell commented Nov 13, 2017

I haven't actually done any work on this, I was just trying to find out what the cause of the test failures was, and given it was in Pester I didn't actually have to change any code.

aaronpowell added a commit that referenced this issue Nov 15, 2017

aaronpowell added a commit that referenced this issue Nov 16, 2017

Linux support (#38)
* First crack at linux support #35

* having a crack at linux travis support

* removing some quotes

* using bash for the directive isntead

* Simplify Travis config

* Install with -Scope CurrentUser

* Install with -Force

* Remove Import-Module

* Update README

* Escape differently

* Break up big Powershell script

* Use tilde

* Add &

* Add another &

* change quotes

* Add PassThru

* Add codecov helper to repo and make it work cross-platform

* moving the CodeCovIo script to a dot-folder
This will make it ignored by the publishing to PS Gallery

* Bumping the version to 1.7.0 with linux support added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment