Skip to content

Replace removed --force flag in shopify app deploy with --allow-updates - #153

Closed
chiliec wants to merge 1 commit into
fly-apps:mainfrom
chiliec:shopify-cli-4-deploy-flag
Closed

chiliec wants to merge 1 commit into
fly-apps:mainfrom
chiliec:shopify-cli-4-deploy-flag

Conversation

@chiliec

@chiliec chiliec commented Sep 19, 2026

Copy link
Copy Markdown

Fixes #151 (also reported downstream as superfly/flyctl#4944).

What

Shopify CLI 4.0 removed the deprecated --force flag (and SHOPIFY_FLAG_FORCE) from shopify app deploy (4.0.0 release notes). flyShopifyConfig still runs shopify app deploy --force --config <file>, so the CLI exits with Nonexistent flag: --force, Dockerfile generation throws, and fly launch for a Shopify app fails before writing fly.toml.

Fix

Use --allow-updates, which Shopify names as the replacement for --force in non-interactive/CI runs (adds and updates extensions, skips the prompt, does not allow deletions). Same command is echoed in the execute log line.

Verification

  • Installed @shopify/cli@4.8.0 (current latest) locally. shopify app deploy --force --config shopify.app.toml → Nonexistent flag: --force. With --allow-updates the flag parses and the CLI proceeds to the auth step (Authorization is required to continue), which is as far as it can go without a Shopify login.
  • npx eslint fly.js clean.
  • npm test (Node 22): 114 passing, 11 failing — the same 11 fail on unmodified main on this host (they shell out to bun/yarn/pnpm, which are not installed here); none touch the Shopify path.

Shopify CLI 4.0 removed the deprecated --force flag from
`shopify app deploy`, so flyShopifyConfig aborts Dockerfile generation
with "Nonexistent flag: --force" and `fly launch` fails. Use
--allow-updates, the replacement Shopify recommends for non-interactive
runs.

Fixes fly-apps#151
@alexleventer

Copy link
Copy Markdown
Contributor

Thanks @chiliec — this landed in #154, which makes the same --allow-updates change plus a --force fallback for Shopify CLI before 3.90 and error handling. Closing as superseded; it'll ship in 0.7.11.

@chiliec

chiliec commented Oct 21, 2026

Copy link
Copy Markdown
Author

Thanks for picking it up — the pre-3.90 fallback makes sense.

@chiliec
chiliec deleted the shopify-cli-4-deploy-flag branch October 21, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fly launch for Shopify apps fails: shopify app deploy --force — --force removed in Shopify CLI 4.x

3 participants