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

Passing in HA_PORT doesn't work, as $PORT isn't being passed in correctly in code #3

Open
mdrakiburrahman opened this issue Jun 5, 2021 · 0 comments

Comments

@mdrakiburrahman
Copy link

The current logic that implements passing in $HA_PORT from the docker run isn't properly making it to dmgcmd.exe due to this line of code:

$PORT = $HA_PORT -or "8060"
Start-Process $DmgcmdPath -Wait -ArgumentList "-EnableRemoteAccess"

I think -or is being incorrectly used here. By this logic, $PORT always evaluates to True (rather than picking up 8060 if no $HA_PORT is passed in - I think the intention here was to perform NULL Coalesce?)

So you get this error every time:
image

The value of port is invalid. Please set an integer bigger than or equal to 0 and less than or equal to 65535.

Since the expression turns out to be .\dmgcmd.exe -EnableRemoteAccess TRUE.

Possible Solution
image

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

No branches or pull requests

1 participant