Skip to content
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

Test fail because sort and ls aliases are used in Tests #53

Open
dbroeglin opened this issue Nov 5, 2016 · 1 comment
Open

Test fail because sort and ls aliases are used in Tests #53

dbroeglin opened this issue Nov 5, 2016 · 1 comment
Labels

Comments

@dbroeglin
Copy link
Contributor

dbroeglin commented Nov 5, 2016

Expected Behavior

Tests should run cross platform as long as no Windows specific behavior is tested.

Current Behavior

Tests fail on MacOSX.
The reason is documented here: PowerShell/PowerShell#827 Some aliases have been removed on Mac and Linux to avoid conflicts with native command names.

Possible Solution

Use full cmdlet names instead of aliases. Which is encouraged anyway when writing scripts or modules.

Steps to Reproduce (for bugs)

Invoke-Pester 

Context

I historically work on a Mac, using Windows VMs when doing PowerShell. I tried out the powershell package available on mac.

I always rerun tests on a Windows environment before pushing changes but it is convenient to be able to directly develop on the Mac.

BTW, executing the build fails because PSake is doing quite a bit of Windows specific initialization, looking for .Net framework in windir, looking into the registry, etc. Which is weird for a build tool. But Invoke-Pester works. Do you think that the just running Invoke-Pester behavior could be conserved in the future ? If it is not too much work it would be nice to be able to run the tests and the module on a Mac.

Your Environment

  • Module version used: Latest dev branch (7a7afee)
  • Operating System and PowerShell version: MacOSX, PS Core 6.x
Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.11
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@dbroeglin dbroeglin changed the title Test fail because sort and ls aliases are used in Test fail because sort and ls aliases are used in Tests Nov 5, 2016
@devblackops
Copy link
Owner

I haven't done much experimenting with PowerShell on OS X yet. It's not surprising that there will be issues with popular modules like psake. Just taking a quick glance at the psake source, it looks like the support for msbuild is why it checks for .Net versions in the registry.

Running Script Analyzer (if it works on OS X, haven't tried myself) and Pester should be enough if you want to develop on the Mac.

BTW, have you seen any issues with this module on OS X?

@devblackops devblackops added the bug label Nov 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants