Skip to content

Commit df94090

Browse files
committed
fix: apply gofmt formatting and stabilize doc comments
- Align struct field in platform_security_test.go (gofmt) - Rewrite two doc comments in shell.go to avoid the single-quote sequence that gofmt's doc comment formatter converts to a Unicode right double quotation mark (U+201D), breaking CI gofmt checks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9027336 commit df94090

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎internal/platform/platform_security_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ func truncateForTestName(s string) string {
630630

631631
func TestIsGitBash(t *testing.T) {
632632
tests := []struct {
633-
name string
633+
name string
634634
shell ShellInfo
635635
want bool
636636
}{

‎internal/platform/shell.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func buildResumeCommandString(sessionID string, cfg ResumeConfig) (string, error
230230

231231
// shellQuote wraps s in POSIX single quotes if it contains whitespace or
232232
// shell metacharacters. Single quotes suppress all shell interpretation;
233-
// embedded single quotes are escaped with the '\” idiom (end quote,
233+
// embedded single quotes are escaped with the POSIX end-escape-reopen idiom (end quote,
234234
// escaped literal quote, restart quote).
235235
func shellQuote(s string) string {
236236
// Strip null bytes — they can truncate strings in C-based shell
@@ -312,8 +312,8 @@ func isGitBash(shell ShellInfo) bool {
312312
// bashifyCmd converts a Windows-style resume command for use with bash -c.
313313
// It performs three transformations:
314314
// 1. Backslash → forward slash (MSYS path compatibility).
315-
// 2. Escape existing single quotes with the '\'' idiom so they survive
316-
// inside the POSIX single-quoted tokens produced by step 3.
315+
// 2. Escape existing single quotes with the POSIX end-escape-reopen
316+
// idiom so they survive inside the single-quoted tokens from step 3.
317317
// 3. Double quote → single quote. Double quotes can be stripped by
318318
// intermediate launchers (cmd.exe, wt.exe) before bash sees them,
319319
// causing space-in-path breakage. Single quotes survive intact and

0 commit comments

Comments
 (0)