Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(agent/agentcontainers): add Exec method to devcontainers CLI#18244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@mafredrimafredriforce-pushed themafredri/feat-agent-devcontainer-injection-2 branch fromdda97d9 to2984d4eCompareJune 5, 2025 12:50
@mafredrimafredriforce-pushed themafredri/feat-agent-devcontainer-injection-3 branch fromd49f84e to011a8aaCompareJune 5, 2025 12:51
@mafredrimafredriforce-pushed themafredri/feat-agent-devcontainer-injection-2 branch 2 times, most recently fromae52380 to5cf4ae7CompareJune 5, 2025 13:58
@mafredrimafredriforce-pushed themafredri/feat-agent-devcontainer-injection-3 branch from011a8aa to63f93bcCompareJune 5, 2025 13:59
@mafredrimafredriforce-pushed themafredri/feat-agent-devcontainer-injection-2 branch from5cf4ae7 to2dc395dCompareJune 6, 2025 08:44
@mafredrimafredriforce-pushed themafredri/feat-agent-devcontainer-injection-3 branch from63f93bc to0deaab8CompareJune 6, 2025 08:44
@mafredrimafredriforce-pushed themafredri/feat-agent-devcontainer-injection-2 branch from2dc395d toea0125dCompareJune 6, 2025 09:25
@mafredrimafredriforce-pushed themafredri/feat-agent-devcontainer-injection-3 branch from0deaab8 to8796ba3CompareJune 6, 2025 09:30
@mafredrimafredri marked this pull request as ready for reviewJune 6, 2025 09:39
Comment on lines 45 to 84
// WithContainerID sets the container ID to target a specific container.
// Can only be used with the Exec command.
funcWithContainerID(idstring)DevcontainerCLIOptions {
returnfunc(o*devcontainerCLIUpConfig) {
ifo.command!="exec" {
panic("developer error: WithContainerID can only be used with the Exec command")
}
o.args=append(o.args,"--container-id",id)
}
}

// WithRemoteEnv sets environment variables for the Exec command.
// Can only be used with the Exec command.
funcWithRemoteEnv(env...string)DevcontainerCLIOptions {
returnfunc(o*devcontainerCLIUpConfig) {
ifo.command!="exec" {
panic("developer error: WithRemoteEnv can only be used with the Exec command")
}
for_,e:=rangeenv {
o.args=append(o.args,"--remote-env",e)
}
}
}

Copy link
Member

Choose a reason for hiding this comment

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

Given that these two options can only be used withdevcontainer exec, I think it makes more sense to keep them as a different type. I like the idea of having the uniform signature of...DevcontainerCLIOptions but this is offset by potential run-time errors instead of compile-time errors.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yeah, agreed, I'll change it.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Fixed inadbfd45

Base automatically changed frommafredri/feat-agent-devcontainer-injection-2 tomainJune 6, 2025 10:33
@mafredrimafredriforce-pushed themafredri/feat-agent-devcontainer-injection-3 branch from8796ba3 toadbfd45CompareJune 6, 2025 11:20
@mafredrimafredri merged commit709f374 intomainJun 6, 2025
34 checks passed
@mafredrimafredri deleted the mafredri/feat-agent-devcontainer-injection-3 branchJune 6, 2025 11:39
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 6, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@DanielleMaywoodDanielleMaywoodDanielleMaywood approved these changes

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mafredri@johnstcn@DanielleMaywood

[8]ページ先頭

©2009-2025 Movatter.jp