Repository navigation
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
1 issue found across 8 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/job.ts">
<violation number="1" location="src/job.ts:957">
P2: Interactive PowerShell jobs cannot consume input because this branch always passes `-NonInteractive`. Omit that switch for `this.interactive` jobs while retaining inherited stdin.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| this._filesToRm.push(interactiveScriptFile); | ||
|
|
||
| const interactiveCp = execa(this.argv.shell, [ | ||
| "-NoProfile", "-NoLogo", "-NonInteractive", "-ExecutionPolicy", "Bypass", |
There was a problem hiding this comment.
P2: Interactive PowerShell jobs cannot consume input because this branch always passes -NonInteractive. Omit that switch for this.interactive jobs while retaining inherited stdin.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/job.ts, line 957:
<comment>Interactive PowerShell jobs cannot consume input because this branch always passes `-NonInteractive`. Omit that switch for `this.interactive` jobs while retaining inherited stdin.</comment>
<file context>
@@ -927,8 +942,32 @@ If you know what you're doing and would like to suppress this warning, use one o
+ this._filesToRm.push(interactiveScriptFile);
+
+ const interactiveCp = execa(this.argv.shell, [
+ "-NoProfile", "-NoLogo", "-NonInteractive", "-ExecutionPolicy", "Bypass",
+ "-File", interactiveScriptFile,
+ ], {
</file context>
| "-NoProfile", "-NoLogo", "-NonInteractive", "-ExecutionPolicy", "Bypass", | |
| "-NoProfile", "-NoLogo", ...(this.interactive ? [] : ["-NonInteractive"]), "-ExecutionPolicy", "Bypass", |
There was a problem hiding this comment.
Fixed by removing -NonInteractive from the interactive path. That branch only runs for interactive jobs, so the conditional was unnecessary. Non-interactive jobs still pass it.
Document SHELL= in dotenv separately from GCL_SHELL in the environment. Check native-command status after each PowerShell line, and let interactive jobs read stdin with job variables taking precedence over the host environment. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Splitting scripts on physical lines inserted the failure probe inside if/else, try/catch, pipelines, and here-strings. Co-authored-by: Cursor <cursoragent@cursor.com>
Closes #1739
Shell-executor jobs always ran through Git Bash. Add
--shell bash|powershell|pwsh(alsoGCL_SHELLorSHELL=in.gitlab-ci-local-env) so those jobs can run in Windows PowerShell or PowerShell Core, with job variables passed into the process.Container jobs still use bash inside the image.
Tested on Windows with PowerShell 5.1 and pwsh 7.6. The new tests run only on Windows, so Linux CI will skip them.
Summary by cubic
Shell-executor jobs can now run in Windows PowerShell or PowerShell Core instead of Git Bash via a new
--shelloption, also settable withGCL_SHELLin the environment orSHELL=in.gitlab-ci-local-env. Job variables take precedence over the host environment, and interactive jobs keep reading from stdin. Container jobs still use bash inside the image. Closes #1739.Written for commit ac5aa2d. Summary will update on new commits.