Skip to content

-Raw required to support ConvertFrom-Json on Powershell 3.0#42

Merged
chcosta merged 1 commit into
dotnet:masterfrom
chcosta:globaljson-fix
Mar 2, 2018
Merged

-Raw required to support ConvertFrom-Json on Powershell 3.0#42
chcosta merged 1 commit into
dotnet:masterfrom
chcosta:globaljson-fix

Conversation

@chcosta
Copy link
Copy Markdown
Member

@chcosta chcosta commented Mar 2, 2018

Testing CI

@chcosta
Copy link
Copy Markdown
Member Author

chcosta commented Mar 2, 2018

@mmitche , is it possible that Powershell versions across CI machines are inconsistent? CI appears to have randomly started failing for Windows machines. ie, The line which is failing in #35 CI runs did not change recently.

@natemcmaster
Copy link
Copy Markdown
Contributor

natemcmaster commented Mar 2, 2018

That makes sense. Maybe we should add #requires

#requires -version 5

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_requires

@chcosta
Copy link
Copy Markdown
Member Author

chcosta commented Mar 2, 2018

What would that do to CI, where we may not have as much control over the version?

@natemcmaster
Copy link
Copy Markdown
Contributor

A better error that would look like this:

C:\dev\dotnet\arcade\build\Build.ps1 : The script 'Build.ps1' cannot be run because it contained a "#requires" statement for Windows PowerShell 5.0. The version of Windows PowerShell that is
required by the script does not match the currently running version of Windows PowerShell x.y.z

@chcosta
Copy link
Copy Markdown
Member Author

chcosta commented Mar 2, 2018

I agree that would be a better error. Sounds like something that should be considered once we can be more proscriptive about the powershell dependency in CI or official build machines. I'll file an issue to track this.

@chcosta chcosta merged commit 54a6350 into dotnet:master Mar 2, 2018
@chcosta chcosta deleted the globaljson-fix branch March 2, 2018 18:26
agocke pushed a commit to agocke/arcade that referenced this pull request Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants