File tree 2 files changed +11
-8
lines changed
packages/app-builder-lib/src/targets
2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " app-builder-lib " : patch
3
+ ---
4
+
5
+ fix: allow publishing to Snap Store to be disabled with snap specific publish options
Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ export default class SnapTarget extends Target {
259
259
target : this ,
260
260
arch,
261
261
packager,
262
- publishConfig : publishConfig == null ? { provider : "snapStore" } : publishConfig ,
262
+ publishConfig,
263
263
} )
264
264
}
265
265
@@ -269,16 +269,14 @@ export default class SnapTarget extends Target {
269
269
}
270
270
271
271
function findSnapPublishConfig ( config ?: Configuration ) : SnapStoreOptions | null {
272
+ const fallback : SnapStoreOptions = { provider : "snapStore" }
273
+
272
274
if ( ! config ) {
273
- return null
275
+ return fallback
274
276
}
275
277
276
278
if ( config . snap ?. publish ) {
277
- const configCandidate = findSnapPublishConfigInPublishNode ( config . snap . publish )
278
-
279
- if ( configCandidate ) {
280
- return configCandidate
281
- }
279
+ return findSnapPublishConfigInPublishNode ( config . snap . publish )
282
280
}
283
281
284
282
if ( config . linux ?. publish ) {
@@ -297,7 +295,7 @@ function findSnapPublishConfig(config?: Configuration): SnapStoreOptions | null
297
295
}
298
296
}
299
297
300
- return null
298
+ return fallback
301
299
}
302
300
303
301
function findSnapPublishConfigInPublishNode ( configPublishNode : Publish ) : SnapStoreOptions | null {
You can’t perform that action at this time.
0 commit comments