Skip to content

Conversation

@Kamyil
Copy link
Owner

@Kamyil Kamyil commented Dec 2, 2025

Summary

Root Cause

When using std::process::Command::args(), Rust quotes the arguments, but cmd /C concatenates them into a single command string where & is still treated as a command separator.

User error output showed:

'f' is not recognized as an internal or external command
'bugID' is not recognized as an internal or external command

Fix

Use raw_arg() from std::os::windows::process::CommandExt to pass the complete command string with proper quoting:

.raw_arg(format!("/C start \"\" \"{}\"", url))

This ensures the URL is wrapped in quotes that cmd.exe will respect.

Related to #42

The previous fix using args() didn't work because cmd.exe still
interprets & as a command separator. Using raw_arg() allows us to
pass the entire command string with proper quoting intact.

Format: cmd /C start "" "url"

Fixes #42
@Kamyil Kamyil merged commit 4fe5d26 into main Dec 2, 2025
3 checks passed
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.

2 participants