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

Update CloneTentacleInstance.ps1 #41

Merged
merged 1 commit into from
Sep 22, 2022
Merged

Update CloneTentacleInstance.ps1 #41

merged 1 commit into from
Sep 22, 2022

Conversation

coryreid
Copy link
Contributor

Changed $portNumber value to use System.Uri. This will allow it to account for trailing slashes in the Endpoint.Uri coming from the Octopus API and prevent inequality evaluations on line 113.

Changed $portNumber value to use `System.Uri`. This will allow it to account for trailing slashes in the `Endpoint.Uri` coming from the Octopus API and prevent inequality evaluations on line 113.
@coryreid coryreid requested a review from BobJWalker September 22, 2022 15:18
@BobJWalker
Copy link
Contributor

Have you tested this on both Windows and Linux? Specifically with PS 5.1 on Windows and PS Core on Linux?

@coryreid
Copy link
Contributor Author

I have now 😅

Output from PowerShell 5.1:

PS C:\Users\coryr> $uriString = "https://192.168.0.16:10933/"
PS C:\Users\coryr> ([System.Uri]$uriString).Port
10933

PS C:\Users\coryr> $uriString = "https://192.168.0.16:10933"
PS C:\Users\coryr> ([System.Uri]$uriString).Port
10933

Output from PowerShell Core on my Ubuntu WSL install:

PS /mnt/c/Users/coryr> $uriString = "https://192.168.0.16:10933/"
PS /mnt/c/Users/coryr> ([System.Uri]$uriString).Port
10933

PS /mnt/c/Users/coryr> $uriString = "https://192.168.0.16:10933"
PS /mnt/c/Users/coryr> ([System.Uri]$uriString).Port
10933

Copy link
Contributor

@BobJWalker BobJWalker left a comment

Choose a reason for hiding this comment

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

LGTM

@BobJWalker
Copy link
Contributor

Closes #42

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