Skip to content

Conversation

STRRL
Copy link
Owner

@STRRL STRRL commented Jun 27, 2025

No description provided.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Asciinema Command Fails with Spaces in Path

The asciinema command fails when the recording file path contains spaces. This occurs because prepareAsciinemaCommand constructs the arguments as a single string using fmt.Sprintf, which is then unsafely split by strings.Fields(). Paths with spaces (common in user home directories) are incorrectly parsed into multiple arguments, leading to asciinema execution failure.

pkg/ttyd.go#L88-L90

shell-now/pkg/ttyd.go

Lines 88 to 90 in b09185e

// Use asciinema as the main command with -c flag to specify shell to record
// Format: asciinema rec filename.cast -c shell_command
return asciinema, fmt.Sprintf("rec %s -c %s", recordingFile, originalCommand), nil

pkg/ttyd.go#L39-L44

shell-now/pkg/ttyd.go

Lines 39 to 44 in b09185e

} else {
// Recording with asciinema - split args properly
argsList := strings.Fields(args)
ttydArgs := []string{"--writable", "--port", fmt.Sprintf("%d", listenPort), "--credential", fmt.Sprintf("%s:%s", username, password), command}
ttydArgs = append(ttydArgs, argsList...)
cmd = exec.CommandContext(ctx, ttydBinary, ttydArgs...)

Fix in Cursor


BugBot free trial expires on July 22, 2025
You have used $0.00 of your $10.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

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.

1 participant