Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/thirty-kings-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/app': patch
---

Fix issue when using `--reset` not creating a new config toml file
2 changes: 1 addition & 1 deletion packages/app/src/cli/services/app-context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe('linkedAppContext', () => {
})

// Then
expect(link).toHaveBeenCalledWith({directory: tmp, apiKey: undefined, configName: 'shopify.app.toml'})
expect(link).toHaveBeenCalledWith({directory: tmp, apiKey: undefined, configName: undefined})
})
})

Expand Down
4 changes: 3 additions & 1 deletion packages/app/src/cli/services/app-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export async function linkedAppContext({

// If the app is not linked, force a link.
if (configState.state === 'template-only' || forceRelink) {
const result = await link({directory, apiKey: clientId, configName: configState.configurationFileName})
// If forceRelink is true, we don't want to use the cached config name and instead prompt the user for a new one.
const configName = forceRelink ? undefined : configState.configurationFileName
const result = await link({directory, apiKey: clientId, configName})
remoteApp = result.remoteApp
configState = result.state
}
Expand Down