HDFGroup / HDFGroup/psh5x

PowerShellHostVersion is not set correctly

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Hi!

Thanks for this provider - it made my day!

The value here https://github.com/HDFGroup/psh5x/blob/4d1521ed79cd894b34329ab019213bd783721e6b/module/HDF5.psd1#L39

```
PowerShellHostVersion = '2.0'
```

Should probably be omitted or changed. The host is not guaranteed to always be the ConsoleHost and it is coincidental that the ConsoleHost version matches the PowerShell version.

This means if I wanted to run a script using this module, as a PowerShell job (using `Start-Job`) the module import fails, even though the PowerShell version is greater than `2.0`.

Example output from my machine: https://gist.github.com/atruskie/dc221a31c8b4b5d0988cb9e7a99fd442
In particular [Line 32](https://gist.github.com/atruskie/dc221a31c8b4b5d0988cb9e7a99fd442#file-hostandpsversion-L32) is causing the issue because `ServerRemoteHost` is version `1.0.0.0`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.