Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always alow to provide --network flag if running the contracts command #247

Merged
merged 2 commits into from
Oct 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aragon/cli",
"version": "5.1.1",
"version": "5.2.0-beta.1",
"description": "Aragon command-line tools",
"main": "dist/cli.js",
"bin": {
Expand Down
6 changes: 4 additions & 2 deletions src/middleware/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ module.exports = function environmentMiddleware (argv) {
const { reporter, module, apm } = argv
let { environment, network } = argv

if (environment && network) {
const isTruffleFwd = argv._[0] === 'contracts'

if (environment && network && !isTruffleFwd) {
reporter.error('Arguments \'--network\' and \'--environment\' are mutually exclusive. Using \'--network\' has been deprecated and \'--environment\' should be used instead.')
process.exit(1)
}

if (!runsInCwd && module) {
if (network && module.environments) {
if (network && module.environments && !isTruffleFwd) {
reporter.error(
'Your arapp.json contains an `environments` property. The use of \'--network\' is deprecated and \'--environment\' should be used instead.'
)
Expand Down