Skip to content

Fixed $null check for consistency and variable "$sudoOffset" typo. Un…#17

Merged
zadjii-msft merged 1 commit intomicrosoft:mainfrom
AlexHimself:main
Feb 9, 2024
Merged

Fixed $null check for consistency and variable "$sudoOffset" typo. Un…#17
zadjii-msft merged 1 commit intomicrosoft:mainfrom
AlexHimself:main

Conversation

@AlexHimself
Copy link
Contributor

@AlexHimself AlexHimself commented Feb 9, 2024

Fixed $null comparison for consistency and corrected a code typo, but I'm unsure if it introduces new issues or solves them.

$sudoOffet ➡️ $sudoOffset

$sudoOffset = $cmdLine.IndexOf($MI.InvocationName)
$cmdLineWithoutScript = $cmdLine.SubString($sudoOffset + 5) # Typo was here

Also removed unused line of code $iam = $MI.MyCommand.ToString(). This might be used for debugging?

…sure if correcting the typo introduced new issues though.
@shiroinekotfs
Copy link

Oh wow, it's a huge problem then. Hope someone will see the merge of this branch.

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

Thanks!

@zadjii-msft zadjii-msft merged commit 91a1370 into microsoft:main Feb 9, 2024
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.

3 participants