Skip to content

overloaded config var weirdness  #3

@rexwhite

Description

@rexwhite

There's an odd scoping issue that results in config and this.config being completely different (and causing problems). Also, the selected org isn't getting saved.

src/generators/create/index.js needs the following changes:

diff --git a/generators/create/index.js b/generators/create/index.js
index c822227..b5f53cb 100644
--- a/generators/create/index.js
+++ b/generators/create/index.js
@@ -121,6 +121,7 @@ class GitCreateGenerator extends _yeomanGenerator.Base {
       }];
     }).then(prompts => this.prompt(prompts)).then(answers => {
       this.config.set('create', answers);
+      this.options.org = answers.org;
     }).then(() => github.getRepos(this.options)).then(repos => {
       return [{
         name: 'name',
@@ -184,6 +185,7 @@ class GitCreateGenerator extends _yeomanGenerator.Base {
       this.config.set('create', (0, _lodash2.default)(this.config.get('create'), { urls: [repo.html_url, repo.ssh_url, repo.clone_url] }));
       this.config.save();
     }).then(() => {
+      let config = this.config.get('create');
       if (config.init) {
         return shell.gitInit().then(() => shell.gitRemote(config));
       }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions