Skip to content

Commit 1262dd3

Browse files
rexxarsbjoerge
authored andcommitted
CLI CDN fixes (#159)
* [client] Use merged config when checking for CDN flag * [core] Explicitly set useCdn to false when creating import client
1 parent 5099c33 commit 1262dd3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/@sanity/client/src/config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ exports.initConfig = (config, prevConfig) => {
5050
throw new Error('Configuration must contain `projectId`')
5151
}
5252

53+
if (typeof newConfig.useCdn === 'undefined') {
54+
printCdnWarning()
55+
}
56+
5357
if (projectBased) {
5458
validate.projectId(newConfig.projectId)
5559
}
@@ -79,9 +83,5 @@ exports.initConfig = (config, prevConfig) => {
7983
}
8084
}
8185

82-
if (typeof config.useCdn === 'undefined') {
83-
printCdnWarning()
84-
}
85-
8686
return newConfig
8787
}

packages/@sanity/core/src/commands/dataset/importDatasetCommand.js

+1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ function getSanityClient(options) {
167167
apiHost: options.gradient,
168168
dataset: options.dataset || config.dataset,
169169
token: options.token || config.token,
170+
useCdn: false
170171
})
171172
}
172173

0 commit comments

Comments
 (0)