diff options
| author | bors <bors@rust-lang.org> | 2024-05-24 17:43:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-05-24 17:43:35 +0000 |
| commit | 56d77b90480c3c923a5689262b186382de4d8d65 (patch) | |
| tree | 8ecfd2c09a305cd2f8f5cf0267be9d22bcc711df /library/std/src/sys/pal/unix/stack_overflow.rs | |
| parent | 6259991f040ad74c5d27e4d834459241f1e20766 (diff) | |
| parent | 3c7a13d8708d7aa72175f6a8cf2992d3381ecb5d (diff) | |
| download | rust-56d77b90480c3c923a5689262b186382de4d8d65.tar.gz rust-56d77b90480c3c923a5689262b186382de4d8d65.zip | |
Auto merge of #17275 - roife:fix-issue-17012, r=Veykril
Fix inconsistent cwd of `run` and `debug` command in client Fix #17012. Also related to #13022 and #15993. When the `kind` of runnable is `bin`, Cargo would use the workspace root as the cwd for the `run` command; otherwise, Cargo defaults to the package root as the cwd for `run`. Initially, r-a assumed the workspace root as the cwd for all runnables in `debug` command, which led to issue #13022. In this case, during unit testing, the `run` command would use the package root while `debug` would use the workspace root, causing inconsistency. PR #15993 addressed this problem by using the package root as the cwd for `debug` command. However, it also resulted in an inconsistency: when executing the `run` command within the main fn of a package (whose target is `bin`), Cargo would use the workspace root, whereas `debug` would use the package root, leading to issue #17012. The preferable approach is to determine the cwd based on the runnable's type. To resolve this, this PR introduces a new `cwd` field within `CargoRunnable`, allowing r-a to decide the appropriate cwd depending on the specific kind of the runnable.
Diffstat (limited to 'library/std/src/sys/pal/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
