Skip to content

Commit 79c2741

Browse files
authored
Merge pull request #1084 from solid/fix/init-serverUri
This will preserve serverUri in config.json
2 parents 1a10760 + bd59628 commit 79c2741

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

bin/lib/init.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ function manipulateEmailSection (answers) {
8282

8383
function manipulateServerSection (answers) {
8484
answers.server = {
85-
name: answers['server-name'],
86-
description: answers['server-description'],
87-
logo: answers['server-logo']
85+
name: answers['server-info-name'],
86+
description: answers['server-info-description'],
87+
logo: answers['server-info-logo']
8888
}
8989
Object.keys(answers).forEach((answer) => {
90-
if (answer.startsWith('server-')) {
90+
if (answer.startsWith('server-info-')) {
9191
delete answers[answer]
9292
}
9393
})

bin/lib/options.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,18 +321,21 @@ module.exports = [
321321
}
322322
},
323323
{
324-
name: 'server-name',
324+
// This property is packaged into an object for the server property in config.json
325+
name: 'server-info-name', // All properties with prefix server-info- will be removed from the config
325326
help: 'A name for your server (not required, but will be presented on your server\'s frontpage)',
326327
prompt: true,
327328
default: answers => new URL(answers['server-uri']).hostname
328329
},
329330
{
330-
name: 'server-description',
331+
// This property is packaged into an object for the server property in config.json
332+
name: 'server-info-description', // All properties with prefix server-info- will be removed from the config
331333
help: 'A description of your server (not required)',
332334
prompt: true
333335
},
334336
{
335-
name: 'server-logo',
337+
// This property is packaged into an object for the server property in config.json
338+
name: 'server-info-logo', // All properties with prefix server-info- will be removed from the config
336339
help: 'A logo that represents you, your brand, or your server (not required)',
337340
prompt: true
338341
},

0 commit comments

Comments
 (0)