adobe/helix-shared

configurations in file system take precedence over GitUrls

dominique-pfister opened this issue ยท 3 comments

I noticed that BaseConfig.loadConfig always tries to load its configuration from the file system first before evaluating its repo URL. Executing the following code in a location where a local helix-query.yaml exists (as in a local checkout of adobe/helix-index-pipelines) will always return the local file, never evaluate owner, repo and ref - is that intentional?

const { IndexConfig } = require('@adobe/helix-shared');

async function main([owner, repo, ref]) {
  return (await new IndexConfig()
    .withRepo(owner, repo, ref)
    .init()).toJSON();
}

main(process.argv.slice(2))
  .then((config) => process.stdout.write(JSON.stringify(config, null, 2)))
  .catch((e) => process.stderr.write(e.toString()));

I think this could lead to unexpected side effects. IMO, If a repo is specified, it should not load it from file.

@trieloff WDYT?

+1

๐ŸŽ‰ This issue has been resolved in version 7.16.1 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€