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

Bugfix: Fixes clean command #815

Merged
merged 3 commits into from
Sep 7, 2019
Merged

Bugfix: Fixes clean command #815

merged 3 commits into from
Sep 7, 2019

Conversation

breautek
Copy link
Contributor

@breautek breautek commented Aug 21, 2019

Platforms affected

Android

Motivation and Context

Fixes the cordova clean command, a reprecussion bug from #764
Fixes #813

Description

Due to some code style refactoring, it became possible for the buildCmd to stay undefined, when it used to default to the incoming parameter cmd value. This fixes ProjectBuilder.getArgs to fallback to cmd value if it doesn't enter in any if conditions.

Testing

npm test & manually testing.

Note that at the time of working on this issue, master currently did not pass npm test. So I have "all new and existing tests pass" checkbox unchecked and checking that box is blocked by #814

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@@ -51,6 +51,8 @@ class ProjectBuilder {
buildCmd = ':app:bundleRelease';
} else if (cmd === 'debug') {
buildCmd = ':app:bundleDebug';
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about assigning the cmd value already to buildCmd in line 49? (i.e., let buildCmd = cmd;) This would remove the else block and only overwrite the buildCmd in the necessary debug and release cases.

Copy link
Contributor Author

@breautek breautek Aug 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yah I could do that for simplicity. Probably will only get a chance to make the commit tomorrow night.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, take your time

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timbru31 I've made the commit.

Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task 'undefined' not found in root project 'android'. master branch
4 participants