Skip to content

fix(cli): use logical OR instead of pipe in build-type condition#250

Merged
rafaeltonholo merged 1 commit intorafaeltonholo:mainfrom
mvanhorn:osc/238-fix-pipe-to-or
Mar 27, 2026
Merged

fix(cli): use logical OR instead of pipe in build-type condition#250
rafaeltonholo merged 1 commit intorafaeltonholo:mainfrom
mvanhorn:osc/238-fix-pipe-to-or

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

@mvanhorn mvanhorn commented Mar 27, 2026

Summary

Fixed a single-character bug on line 154 of the s2c script where | (pipe) was used instead of || (logical OR).

Why this matters

The pipe operator causes $DEBUG to be silently ignored. Only $VERBOSE determines whether the build type is Debug or Release. Setting --debug alone has no effect on the build type.

Changes

  • s2c line 154: | to ||

Testing

Verified the fix matches the existing pattern on line 104 which correctly uses ||.

Fixes #238

This contribution was developed with AI assistance (Claude Code).

Summary by CodeRabbit

  • Bug Fixes
    • Corrected conditional logic in build type detection to properly recognize DEBUG and VERBOSE flags when determining whether to build Debug or Release binaries.

Line 154 used `|` (pipeline) where `||` (logical OR) was intended.
The pipe caused `$DEBUG` to be silently ignored when determining
whether to use Debug or Release build type.

Fixes rafaeltonholo#238
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3f5b3db0-53d9-4c50-a396-9ec43ea71d8c

📥 Commits

Reviewing files that changed from the base of the PR and between e1a34e0 and 74e7ed4.

📒 Files selected for processing (1)
  • s2c

Walkthrough

The s2c wrapper script's conditional logic has been corrected to use logical OR (||) instead of a pipe operator (|). This fixes the broken --debug flag functionality, allowing the Debug build type to be properly triggered when either the DEBUG or VERBOSE environment variables are true.

Changes

Cohort / File(s) Summary
Shell Script Logic Fix
s2c
Changed line 154 from bitwise pipe | to logical OR || in the build-type condition, enabling the --debug flag to correctly trigger Debug builds independently of the --verbose flag.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing a pipe operator with logical OR in the build-type condition of the s2c script.
Linked Issues check ✅ Passed The PR implementation correctly addresses issue #238 by replacing the pipe operator with logical OR, ensuring both DEBUG and VERBOSE flags independently trigger Debug builds.
Out of Scope Changes check ✅ Passed The PR contains only the targeted one-character fix at line 154; the unquoted variable issue mentioned in #238 was appropriately deferred as a separate concern.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rafaeltonholo rafaeltonholo self-requested a review March 27, 2026 20:57
Copy link
Copy Markdown
Owner

@rafaeltonholo rafaeltonholo left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the contribution!

@rafaeltonholo rafaeltonholo merged commit acc3b26 into rafaeltonholo:main Mar 27, 2026
4 checks passed
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.

[Bug]: s2c wrapper script uses pipe | instead of logical OR ||, ignoring --debug flag

2 participants