-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Summary
When updating a workspace with coder update, there's no way to skip interactive prompts even when not using --always-prompt. This makes it difficult to automate workspace updates in scripts or CI/CD pipelines.
Expected Behavior
The coder update command should have a --yes or --auto-approve flag (similar to coder start --yes) that:
- Accepts default values for all parameters
- Skips interactive prompts like IDE selection
- Allows non-interactive workspace updates
Actual Behavior
The coder update command always prompts for parameter values even when --always-prompt is not specified. The --yes flag exists for coder start but not for coder update.
Use Case
This is needed for:
- Automating workspace updates in scripts
- CI/CD pipelines that need to update workspaces
- Consistent deployments across environments
Workaround
Currently the only way to skip prompts is to pipe input:
echo "y" | coder update workspace-nameBut this doesn't work for multi-step prompts (like IDE selection where you need to select options and then confirm).
Suggested Solution
Add a --yes flag to coder update that:
- Uses default values for all parameters
- Skips IDE selection prompt (uses default IDE set in template)
- Behaves consistently with
coder start --yes
Alternatively, document the proper way to non-interactively update a workspace with parameter values.
Environment
- Coder CLI version: 2.13.1