@@ -179,29 +179,27 @@ export class Application extends Program<Definition, Input> {
179
179
const add =
180
180
definition . add === undefined
181
181
? exists &&
182
- ( await this . scanBoolean (
182
+ ! ! ( await this . scanBoolean (
183
183
definition ,
184
- "Do you want to add @QwikDev/astro to your existing project?" ,
185
- false
184
+ "Do you want to add @QwikDev/astro to your existing project?"
186
185
) )
187
186
: definition . add ;
188
187
189
188
const force =
190
189
definition . force === undefined
191
190
? exists &&
192
191
! add &&
193
- ( await this . scanBoolean (
192
+ ! ! ( await this . scanBoolean (
194
193
definition ,
195
194
`Directory "./${ resolveRelativeDir (
196
195
outDir
197
- ) } " already exists and is not empty. What would you like to overwrite it?`,
198
- false
196
+ ) } " already exists and is not empty. What would you like to overwrite it?`
199
197
) )
200
198
: false ;
201
199
202
200
let adapter : Adapter ;
203
201
204
- if ( ! add && definition . adapter === defaultDefinition . adapter ) {
202
+ if ( ( ! add || force ) && definition . adapter === defaultDefinition . adapter ) {
205
203
const adapterInput =
206
204
( ( await this . scanBoolean (
207
205
definition ,
@@ -239,30 +237,28 @@ export class Application extends Program<Definition, Input> {
239
237
240
238
const biome =
241
239
! add && definition . biome === undefined
242
- ? await this . scanBoolean (
240
+ ? ! ! ( await this . scanBoolean (
243
241
definition ,
244
- "Would you prefer Biome over ESLint/Prettier?" ,
245
- false
246
- )
242
+ "Would you prefer Biome over ESLint/Prettier?"
243
+ ) )
247
244
: ! ! definition . biome ;
248
245
249
246
const ci =
250
247
definition . ci === undefined
251
- ? await this . scanBoolean ( definition , "Would you like to add CI workflow?" , false )
248
+ ? ! ! ( await this . scanBoolean ( definition , "Would you like to add CI workflow?" ) )
252
249
: definition . ci ;
253
250
254
251
const install =
255
252
definition . install === undefined
256
- ? await this . scanBoolean (
253
+ ? ! ! ( await this . scanBoolean (
257
254
definition ,
258
- `Would you like to install ${ this . #packageManger} dependencies?` ,
259
- false
260
- )
255
+ `Would you like to install ${ this . #packageManger} dependencies?`
256
+ ) )
261
257
: definition . install ;
262
258
263
259
const git =
264
260
definition . git === undefined
265
- ? await this . scanBoolean ( definition , "Would you like to initialize Git?" , false )
261
+ ? ! ! ( await this . scanBoolean ( definition , "Would you like to initialize Git?" ) )
266
262
: definition . git ;
267
263
268
264
const dryRun = ! ! definition . dryRun ;
0 commit comments