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

feat: check command input is valid array #290

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SimplyFaisal
Copy link

Issue #, if available:

Description of changes:
Commands that include spaces within arguments, special characters, or need quoting can break if naively split on whitespace(command.split(' ')) .

Take for example this input:
alembic revision --autogenerate -m "Your message here".

Splitting on whitespace will result in container def receving the command
[ "alembic", "revision", "--autogenerate", " -m", "Your", "message", " here"] which is incorrect and will result in an error when the command is run.

This PR solves this by validating that the command input is a valid array and adding it to the container definition. Otherwise an error is thrown.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@SimplyFaisal
Copy link
Author

@iamhopaul123 can you review this please? Thanks!

@amazreech
Copy link
Contributor

Hi @SimplyFaisal, thank you so much for your contribution. Apologies on the delay. We will be working on reviewing Pull Requests on the repositories. In the mean time please ensure that below steps, if not already done, are taken care of in your PR:

  1. Verify if PR follows semantic pull request conventions.

  2. Please run npm run package command to update dist/ folder with latest dependencies.

  3. Resolve merge conflicts on the PR

@SimplyFaisal
Copy link
Author

Thanks for the info @amazreech. Confirming that the above requests are satisfied.

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.

None yet

3 participants