From 2baef4842a5fbd54f384be54d55c1d096765bf62 Mon Sep 17 00:00:00 2001 From: Carl Brugger Date: Wed, 27 Aug 2025 21:53:37 -0500 Subject: [PATCH] fix: skip namespace prompt in deploy command when --ci flag is used Prevents CI pipelines from hanging on interactive namespace input when no namespace is provided via options or environment variables. Co-authored-by: Amp Amp-Thread-ID: https://ampcode.com/threads/T-e49789ac-7df6-4ae9-a3f6-11b7739ad3f5 --- .changeset/fix-ci-flag-namespace-prompt.md | 7 +++++++ packages/cli/src/x/actions/deploy.action.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/fix-ci-flag-namespace-prompt.md diff --git a/.changeset/fix-ci-flag-namespace-prompt.md b/.changeset/fix-ci-flag-namespace-prompt.md new file mode 100644 index 00000000..abb5af0f --- /dev/null +++ b/.changeset/fix-ci-flag-namespace-prompt.md @@ -0,0 +1,7 @@ +--- +"flatfile": patch +--- + +Fix CLI deploy command namespace prompt in CI mode + +The deploy command's namespace prompt was not respecting the --ci flag, causing CI pipelines to hang when no namespace was provided via options or environment variables. Now the prompt is skipped in CI mode. diff --git a/packages/cli/src/x/actions/deploy.action.ts b/packages/cli/src/x/actions/deploy.action.ts index c1106a1d..b285484f 100644 --- a/packages/cli/src/x/actions/deploy.action.ts +++ b/packages/cli/src/x/actions/deploy.action.ts @@ -275,7 +275,7 @@ export async function deployAction( const namespacePrefixes = ['space:', 'workbook:', 'sheet:'] let namespace = options?.namespace - if (!selectedAgent && !namespace && !process.env.FLATFILE_AGENT_NAMESPACE) { + if (!selectedAgent && !namespace && !process.env.FLATFILE_AGENT_NAMESPACE && !options?.ci) { const input = await prompts( { type: 'text',