refactor: use dataPath variable as given in file config (#1118)
* Actually use path variables as given in default config * Drop paths.content, avoid populating the global WIKI object
This commit is contained in:
committed by
Nicolas Giard
parent
5b36988d6d
commit
8000ebec8f
@@ -15,7 +15,7 @@ const commonDisk = require('../disk/common')
|
||||
|
||||
module.exports = {
|
||||
git: null,
|
||||
repoPath: path.join(process.cwd(), 'data/repo'),
|
||||
repoPath: path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'repo'),
|
||||
async activated() {
|
||||
// not used
|
||||
},
|
||||
@@ -66,7 +66,7 @@ module.exports = {
|
||||
WIKI.logger.info('(STORAGE/GIT) Setting SSH Command config...')
|
||||
if (this.config.sshPrivateKeyMode === 'contents') {
|
||||
try {
|
||||
this.config.sshPrivateKeyPath = path.join(WIKI.ROOTPATH, 'data/secure/git-ssh.pem')
|
||||
this.config.sshPrivateKeyPath = path.resolve(WIKI.ROOTPATH, WIKI.config.dataPath, 'secure/git-ssh.pem')
|
||||
await fs.outputFile(this.config.sshPrivateKeyPath, this.config.sshPrivateKeyContent, {
|
||||
encoding: 'utf8',
|
||||
mode: 0o600
|
||||
|
Reference in New Issue
Block a user