Skip to content

Rename Command::cd into Command::current_directory#128

Merged
syphar merged 1 commit intorust-lang:mainfrom
GuillaumeGomez:improve-naming
May 6, 2026
Merged

Rename Command::cd into Command::current_directory#128
syphar merged 1 commit intorust-lang:mainfrom
GuillaumeGomez:improve-naming

Conversation

@GuillaumeGomez
Copy link
Copy Markdown
Member

It's been bothering me for a while so now I finally decided to fix it. :3

cc @syphar

Copy link
Copy Markdown
Member

@syphar syphar left a comment

Choose a reason for hiding this comment

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

I might be nitpicking, but isn't the better name something around workdir or working-directory? because that's what it is?

In the SandboxBuilder it's called workdir

@GuillaumeGomez
Copy link
Copy Markdown
Member Author

GuillaumeGomez commented May 6, 2026

I'd say no: I'm following the std's Command API naming: https://doc.rust-lang.org/nightly/std/process/struct.Command.html#method.current_dir

Also, it's the current directory where the command will be executed. So I think current_dir is better for this case. And we should also likely update SandboxBuilder's too.

@syphar
Copy link
Copy Markdown
Member

syphar commented May 6, 2026

kk, valid

@syphar syphar merged commit 56b9772 into rust-lang:main May 6, 2026
7 checks passed
@GuillaumeGomez GuillaumeGomez deleted the improve-naming branch May 6, 2026 20:46
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