From ba9e12683775ae21ed098c0a56697ce4b6807438 Mon Sep 17 00:00:00 2001 From: Devin Zuczek Date: Mon, 26 Oct 2026 14:25:16 -0400 Subject: [PATCH] fix merge --- packages/tools/src/cmd/admin.cmd.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/tools/src/cmd/admin.cmd.ts b/packages/tools/src/cmd/admin.cmd.ts index bd8b5ee..bf1cfd4 100644 --- a/packages/tools/src/cmd/admin.cmd.ts +++ b/packages/tools/src/cmd/admin.cmd.ts @@ -591,6 +591,15 @@ const settingsImportKv = new Command('settings-import-kv') await fs.writeFile(sqlFile, statements.join('\n')) try { await execSqlFile(sqlFile, remote, 'playersettings') + } catch (err) { + // A large remote `--file` goes through D1's import API, and wrangler can fail its + // final status poll with this after the import has already completed (it did, for + // all 15,137 rows, the first time this ran). Fall through to the check below, which + // decides whether the rows actually landed. + if (!(err instanceof Error && err.message.includes('Not currently importing anything'))) { + throw err + } + console.log(chalk.yellow(' wrangler lost track of the import; checking what landed')) } finally { await fs.remove(sqlFile) }