Skip to content

Conversation

@adityapatwardhan
Copy link
Member

@adityapatwardhan adityapatwardhan commented Aug 9, 2018

Fix #7485

PR Summary

When trying to build on RHEL, the environment is not recognized as RedHatFamily.
Added detection logic so that appropriate symbolic links are generated.

PR Checklist

build.psm1 Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the logic should be more like Fedora with a -ge rather than a -match so we don't have to fix it again

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I modelled it after CentOS and others, where we are matching for the VERSION_ID. And since the variable is called IsRedHat7 we may want to revisit when RedHat goes to version 8 anyways.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should have a test at the end of the detection that verifies we matched at least one and throw if we don't.

Copy link
Contributor

@dantraMSFT dantraMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider detecting that no Linux match was found and throw to protect against future changes.

build.psm1 Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should have a test at the end of the detection that verifies we matched at least one and throw if we don't.

When trying to build on RHEL, the environment is not recongnized as RedHatFamily.
Added detection logic so that appropriate symbolic links are generated.
@adityapatwardhan
Copy link
Member Author

@TravisEz13 Added another property called IsRedHat to future proof the logic.
@dantraMSFT Added a throw when none of the environments are set.

@adityapatwardhan
Copy link
Member Author

@TravisEz13 Ready to merge?

@TravisEz13 TravisEz13 merged commit ee33db0 into PowerShell:master Aug 14, 2018
@adityapatwardhan adityapatwardhan deleted the FixRHELBuild branch November 1, 2018 17:40
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.

New-PSSession does not find WSMan client library on RHEL72

3 participants