Skip to content

Commit

Permalink
Ignore setup GitHub Actions if hosting also selected (#3742) (#3838)
Browse files Browse the repository at this point in the history
* Ignore setup GitHub Actions if hosting also selected

* Add a line to CHANGELOG.md

Co-authored-by: Bryan Kendall <bkend@google.com>
  • Loading branch information
2 people authored and kroikie committed Mar 4, 2022
1 parent 42dfd0c commit 3cfc102
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -0,0 +1 @@
- Fixes issue where `init` would crash with multiple Hosting items selected (#3742).
5 changes: 5 additions & 0 deletions src/commands/init.js
Expand Up @@ -189,6 +189,11 @@ module.exports = new Command("init [feature]")
setup.features.unshift("account");
}

// "hosting:github" is a part of "hosting", so if both are selected, "hosting:github" is ignored.
if (setup.features.includes("hosting") && setup.features.includes("hosting:github")) {
setup.features = setup.features.filter((f) => f != "hosting:github");
}

return init(setup, config, options);
})
.then(function () {
Expand Down

0 comments on commit 3cfc102

Please sign in to comment.