这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions crates/turborepo-lib/src/commands/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ pub async fn link(
)
})?;

fs::create_dir_all(base.repo_root.join_component(".turbo"))
Copy link
Member Author

Choose a reason for hiding this comment

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

@nathanhammond @gsoltis While testing, I discovered that link --target=spaces wasn't writing the selected team ID to .turbo/config.json. I ran into a situation where I had linked the repo for Remote Caching to another team and when I tried to enable Spaces, it wasn't generating any Runs data because it was trying to use the wrong team ID on subsequent requests.

I'm wondering what you recommend to do. We could ask the user if they want to override the team ID if the user tries to select a team that is different than the one that is already configured for the repository, we could show an error if the team ID that is already configured is different than the selected one, or we could store the team IDs for remote cache and spaces in separate fields. Thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

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

.context("could not create .turbo directory")?;
base.repo_config_mut()?
.set_team_id(Some(team_id.to_string()))?;

println!(
"
{} {} linked to {}
Expand Down