Skip to content

utils.pwsh: Fix conditional expression#310

Open
RytoEX wants to merge 1 commit intoobsproject:masterfrom
RytoEX:fix-setup-host-conditional
Open

utils.pwsh: Fix conditional expression#310
RytoEX wants to merge 1 commit intoobsproject:masterfrom
RytoEX:fix-setup-host-conditional

Conversation

@RytoEX
Copy link
Copy Markdown
Member

@RytoEX RytoEX commented Apr 6, 2026

Description

Fix a conditional expression in utils.pwsh/Setup-Host.ps1.

Motivation and Context

Fixes #307.

How Has This Been Tested?

Tested locally in PowerShell with simple if statements.

if ( $false && $false ) { echo "true" }

Outputs true.

if ( $false -and $false ) { echo "true" }

Does not output anything.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@RytoEX RytoEX requested a review from PatTheMav April 6, 2026 19:45
@RytoEX RytoEX self-assigned this Apr 6, 2026
@RytoEX RytoEX added the bug Something isn't working label Apr 6, 2026
Currently, this conditional always evaluates to true. It seems that the
intent was to skip Install-Dependencies if either SkipAll or SkipDeps
was specified. Fix the conditional logic to reflect that.
@RytoEX RytoEX force-pushed the fix-setup-host-conditional branch from d8027c4 to 32ce480 Compare April 6, 2026 20:48
@RytoEX
Copy link
Copy Markdown
Member Author

RytoEX commented Apr 6, 2026

After the initial CI failures, I noticed that this was a bit more nuanced than a simple replacement. The intent seems to be to skip Install-Dependencies if either -SkipAll or -SkipDeps is specified. Update the conditional logic to reflect that, and add debug logging to the else branch to verify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Condtional in Setup-Host.ps1 always true

1 participant