projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e730aef
)
Fix #1328 - application-config initialisation in CLI tools (#1343)
author
Frank de Lange
<github-f@unternet.org>
Wed, 24 Oct 2018 10:28:25 +0000
(12:28 +0200)
committer
Rigel Kent
<par@rigelk.eu>
Wed, 24 Oct 2018 10:28:25 +0000
(12:28 +0200)
Test for an empty object in `cli.ts` when no config data is present (i.e. when run on a new install).
server/tools/cli.ts
patch
|
blob
|
history
diff --git
a/server/tools/cli.ts
b/server/tools/cli.ts
index 53b20964e6faef34fd4d4ea2d9a5905aec75c0e0..108c44218934627ccba67ad79cbe5bd643147cab 100644
(file)
--- a/
server/tools/cli.ts
+++ b/
server/tools/cli.ts
@@
-23,7
+23,7
@@
async function getSettings () {
if (err) {
return rej(err)
}
- return res(
data || settings
)
+ return res(
Object.keys(data).length === 0 ? settings : data
)
})
})
}