You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation describes this environment variable as the working directory of the workspace root:
CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY - The original working directory of the workspace. Enables workspace members access to the workspace level CARGO_MAKE_WORKING_DIRECTORY.
However, in an emulated workspace, this environment variable becomes the directory of the member crate.
In a non-emulated workspace, the environment variable is correct.
To Reproduce
Steps to reproduce the behavior:
Create a directory to serve as the workspace (mkdir workspace-wd)
Create member crates (cargo new --bin member1; cargo new --lib member2)
$ cargo make root
[cargo-make] INFO - cargo make 0.31.0
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: root
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: workspace
[cargo-make][1] INFO - External file not found or is not a file, skipping.
[cargo-make][1] INFO - Project: member1
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: root
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Running Task: root
[cargo-make][1] INFO - Execute Command: "echo" "/tmp/workspace-wd/member1"
/tmp/workspace-wd/member1
[cargo-make][1] INFO - Build Done in 0 seconds.
/tmp/workspace-wd
[cargo-make][1] INFO - External file not found or is not a file, skipping.
[cargo-make][1] INFO - Project: member2
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: root
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Running Task: root
[cargo-make][1] INFO - Execute Command: "echo" "/tmp/workspace-wd/member2"
/tmp/workspace-wd/member2
[cargo-make][1] INFO - Build Done in 0 seconds.
/tmp/workspace-wd
[cargo-make] INFO - Build Done in 0 seconds.
Expected result:
$ cargo make root
[cargo-make] INFO - cargo make 0.31.0
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: root
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: workspace
[cargo-make][1] INFO - External file not found or is not a file, skipping.
[cargo-make][1] INFO - Project: member1
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: root
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Running Task: root
[cargo-make][1] INFO - Execute Command: "echo" "/tmp/workspace-wd"
/tmp/workspace-wd
[cargo-make][1] INFO - Build Done in 0 seconds.
/tmp/workspace-wd
[cargo-make][1] INFO - External file not found or is not a file, skipping.
[cargo-make][1] INFO - Project: member2
[cargo-make][1] INFO - Build File: Makefile.toml
[cargo-make][1] INFO - Task: root
[cargo-make][1] INFO - Profile: development
[cargo-make][1] INFO - Running Task: root
[cargo-make][1] INFO - Execute Command: "echo" "/tmp/workspace-wd"
/tmp/workspace-wd
[cargo-make][1] INFO - Build Done in 0 seconds.
/tmp/workspace-wd
[cargo-make] INFO - Build Done in 0 seconds.
The text was updated successfully, but these errors were encountered:
Describe the bug
The documentation describes this environment variable as the working directory of the workspace root:
However, in an emulated workspace, this environment variable becomes the directory of the member crate.
In a non-emulated workspace, the environment variable is correct.
To Reproduce
Steps to reproduce the behavior:
mkdir workspace-wd
)cargo new --bin member1; cargo new --lib member2
)Makefile.toml
in the workspace root:root
task.Actual result:
Expected result:
The text was updated successfully, but these errors were encountered: