-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(frontend): add windowsVerbatimArguments for Windows .cmd validation (ACS-252) #1075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
5425a78
68cc956
28a69c9
a49b683
9fae247
8af146f
4f0d0c3
dcd7165
140e13a
e26b7ac
b59cde4
08bf443
bbbb2f2
948f3fa
705cac6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,6 +23,10 @@ import semver from 'semver'; | |||||||||||||||||
|
|
||||||||||||||||||
| const execFileAsync = promisify(execFile); | ||||||||||||||||||
|
|
||||||||||||||||||
| type ExecFileAsyncOptionsWithVerbatim = import('child_process').ExecFileOptionsWithStringEncoding & { | ||||||||||||||||||
| windowsVerbatimArguments?: boolean; | ||||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
|
||||||||||||||||||
| type ExecFileAsyncOptionsWithVerbatim = import('child_process').ExecFileOptionsWithStringEncoding & { | |
| windowsVerbatimArguments?: boolean; | |
| }; | |
| import type { ExecFileOptionsWithStringEncoding } from 'child_process'; | |
| type ExecFileAsyncOptionsWithVerbatim = ExecFileOptionsWithStringEncoding & { | |
| windowsVerbatimArguments?: boolean; | |
| }; |
🤖 Prompt for AI Agents
In `@apps/frontend/src/main/ipc-handlers/claude-code-handlers.ts` around lines 26
- 29, Summary: Suggest moving the child_process import to the file top-level and
switch ExecFileAsyncOptionsWithVerbatim to a union-based type for slightly
stronger type safety. Fix: add a top-level import of
ExecFileOptionsWithStringEncoding from 'child_process' (use an import type to
match other imports), then redefine the ExecFileAsyncOptionsWithVerbatim type
using a union that includes the base ExecFileOptionsWithStringEncoding and a
variant that adds windowsVerbatimArguments?: boolean so callers get the safer
discrimination; update any references to ExecFileAsyncOptionsWithVerbatim
accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type definition is a duplicate of the one found in
apps/frontend/src/main/cli-tool-manager.ts(lines 38-40). To improve maintainability and adhere to the DRY (Don't Repeat Yourself) principle, consider moving this type to a shared location. For example, you could export it fromcli-tool-manager.tsand import it here, or move it to a new shared types file within themainprocess directory.