Fixed yarn dev --stripe ignoring HTTPS configured sites

- because the cwd of `.github/dev.js` is not `ghost/core`, it doesn't
  pick up config.local.json files, so any configuration you set in there
  isn't applied
- this meant that developers with HTTPS configured locally couldn't use
  `--stripe` because it wouldn't configure the Stripe listening URL
  correctly
- this adds an exports to the config lib to allow passing options in,
  which I then utilize to pass the directory that config resides in
- this should fix the aforementioned problem with HTTPS
This commit is contained in:
Daniel Lockyer 2022-10-06 15:58:51 +07:00
parent a35d388543
commit 0bfbee5523
No known key found for this signature in database
2 changed files with 5 additions and 1 deletions

5
.github/dev.js vendored
View File

@ -4,7 +4,10 @@ const exec = util.promisify(require('child_process').exec);
const concurrently = require('concurrently');
const config = require('../ghost/core/core/shared/config');
const config = require('../ghost/core/core/shared/config').withOptions({
customConfigPath: path.join(__dirname, '../ghost/core')
});
const liveReloadBaseUrl = config.getSubdir() || '/ghost/';
const siteUrl = config.getSiteUrl();

View File

@ -1,3 +1,4 @@
const loader = require('./loader');
module.exports = loader.loadNconf();
module.exports.withOptions = (options) => loader.loadNconf(options);