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

Corrected app directory #548

Merged
merged 1 commit into from
Sep 29, 2022

Conversation

carvinlo
Copy link
Contributor

@carvinlo carvinlo commented Sep 29, 2022

New Pull Request

For more information, see the CONTRIBUTING guide.

Prerequisites

Please make sure you can check the following boxes:

  • I have read the CONTRIBUTING document
  • My code follows the code style of this project
  • All new and existing tests passed

Type(s) of Changes

Contribution Type

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue, please reference the issue id)
  • New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • I have updated the documentation accordingly
  • I have added tests to cover my changes

Description

appDirs variable will get [undefined] when appInstanceDir variable is undefined.
const appDirs = [appInstanceDir] || (await getOrMakeApps(pilets[0], logLevel)); -> const appDirs = appInstanceDir ? [appInstanceDir] : (await getOrMakeApps(pilets[0], logLevel));

Remarks

[Optionally place any follow-up comments, remarks, observations, or notes here for future reference]

Copy link
Contributor

@FlorianRappl FlorianRappl left a comment

Choose a reason for hiding this comment

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

Thanks for spotting 🍻!

@FlorianRappl FlorianRappl added bug Something isn't working cli Concerns the piral-cli application. labels Sep 29, 2022
@carvinlo
Copy link
Contributor Author

Or const appDirs = typeof appInstanceDir === 'undefined' ? [appInstanceDir] : (await getOrMakeApps(pilets[0], logLevel)); ?

@FlorianRappl FlorianRappl merged commit 65701e0 into smapiot:develop Sep 29, 2022
@FlorianRappl
Copy link
Contributor

I think how it was fixed was fine - the truthy check should be sufficient.

@FlorianRappl FlorianRappl added this to the 0.15.0 milestone Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Concerns the piral-cli application.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants