fix(scripts): put the shebang on line 1 of nqc/nqc-launcher.sh - #79
Conversation
The shebang was not the first line, so the kernel never honoured it — the script ran under whatever shell invoked it rather than the one it declares. shellcheck reports this as SC1128. Found by an estate-wide sweep of 5,111 tracked scripts across 375 repos: 20 files carry this defect, 19 of them a generated *-launcher.sh. ⚠ Source not identified. The generator, standards/docs/UX-standards/comprehensive-launcher-template.sh, is CLEAN — its own line 1 is the shebang and it reports 0 shellcheck errors. The stray line is therefore introduced when the launcher is copied into each repo, by something not yet found, so this may recur until that is tracked down. Other lines are preserved in order; only the shebang moves.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe supplied diff contains no observable code changes. It affects Changes
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This is a localized shebang correction in one script, with no actionable merge-blocking risk remaining beyond normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. ✨ Finishing Touches📝 Generate docstrings
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. Comment |
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Pull Request Overview
This PR correctly relocates the shebang to the first line of nqc/nqc-launcher.sh, which is required for correct script execution and to resolve Shellcheck error SC1128. While the fix meets the technical requirement, it is applied to a file explicitly marked as auto-generated by launch-scaffolder.
Codacy indicates the PR is up to standards, but a high risk of regression exists because the root cause in the generator has not been addressed. Future regenerations of this file will likely overwrite this manual fix.
About this PR
- The file
nqc/nqc-launcher.shcontains a header stating it is generated bylaunch-scaffolderand should not be edited directly. This manual fix is a temporary solution that will be lost during the next code generation. Please investigate fixing the source template or configuration instead.
Test suggestions
- Verify that nqc-launcher.sh starts with the shebang on line 1 via shellcheck or execution check.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that nqc-launcher.sh starts with the shebang on line 1 via shellcheck or execution check.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
| @@ -1,4 +1,3 @@ | |||
|
|
|||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
⚪ LOW RISK
Nitpick: This file contains a warning that it should not be edited directly as it is generated by launch-scaffolder. While moving the shebang to line 1 is necessary for the script's execution, this manual change will likely be overwritten during the next realignment.
Try running the following prompt in your IDE agent:
Investigate the
launch-scaffoldertemplate or thenqc.launcher.a2mlconfiguration to ensure the shebang is correctly placed on line 1 during code generation, rather than applying a manual fix to the output file.
The shebang was not the first line, so the kernel never honoured it — the script ran under whatever shell invoked it rather than the one it declares. shellcheck reports this as
SC1128.Found by an estate-wide sweep of 5,111 tracked scripts across 375 repos: 20 files carry this defect, 19 of them a generated
*-launcher.sh.⚠ Source not identified. The generator
standards/docs/UX-standards/comprehensive-launcher-template.shis clean — its own line 1 is the shebang and it reports 0 shellcheck errors. The stray line is introduced when the launcher is copied into each repo, by something not yet found, so this may recur until that is tracked down.Other lines are preserved in order; only the shebang moves.