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

Failes silently when there are command line options after the command #35

Closed
dlech opened this issue Jan 23, 2016 · 2 comments
Closed
Labels

Comments

@dlech
Copy link
Member

dlech commented Jan 23, 2016

It used to not matter what order the options or commands are in. Now, if you have an option, e.g. -f after the command in the command line, brickstrap fails silently.

@cmacq2
Copy link
Contributor

cmacq2 commented Jan 23, 2016

The bug is easy to fix: after shifting with shift $((OPTIND-1)) we need to check that $# -ge 1 (i.e that at least one more argument remains) or else you have the problem that the last shift 1 will error out.

Presumably it went undetected because it triggers only if you put the command in second to last position.

I'll update PR #29 with a fix.

cmacq2 added a commit to cmacq2/brickstrap that referenced this issue Jan 23, 2016
This commit provides preliminary support for custom partitioning schemes/image file types.
For discussion refer to: issue ev3dev#10:
ev3dev#10

This commit covers the following changes:
 - Introduce brickstrap-image.sh module for custom partitioning support.
 - Introduce brickstrap-image-drivers.sh module for default image type drivers.
 - Introduce -l option to select partitioning layout/image type driver at build time.
 - Source custom-image.sh files after sourcing configs.
 - Permit custom image type drivers to register validation functions, which are invoked during brp_init_env()
 - Add br_image_name, br_image_type and br_image_path functions which take no arguments. (Rename old br_image_path to brp_image_path).
 - Add support for DEFAULT_IMAGE_TYPE variable for project configurations to override default image type to create.
 - Fix bug/regression (command line parsing errors out with commands in second to last position). See issue ev3dev#35:
   ev3dev#35
cmacq2 added a commit to cmacq2/brickstrap that referenced this issue Jan 23, 2016
This commit provides preliminary support for custom partitioning schemes/image file types.
For discussion refer to: issue ev3dev#10:
ev3dev#10

This commit covers the following changes:
 - Introduce brickstrap-image.sh module for custom partitioning support.
 - Introduce brickstrap-image-drivers.sh module for default image type drivers.
 - Introduce -l option to select partitioning layout/image type driver at build time.
 - Source custom-image.sh files after sourcing configs.
 - Permit custom image type drivers to register validation functions, which are invoked during brp_init_env()
 - Add br_image_name, br_image_type and br_image_path functions which take no arguments. (Rename old br_image_path to brp_image_path).
 - Add support for DEFAULT_IMAGE_TYPE variable for project configurations to override default image type to create.
 - Fix bug/regression (command line parsing errors out with commands in second to last position). See issue ev3dev#35:
   ev3dev#35
cmacq2 added a commit to cmacq2/brickstrap that referenced this issue Jan 23, 2016
This commit provides preliminary support for custom partitioning schemes/image file types.
For discussion refer to: issue ev3dev#10:
ev3dev#10

This commit covers the following changes:
 - Introduce brickstrap-image.sh module for custom partitioning support.
 - Introduce brickstrap-image-drivers.sh module for default image type drivers.
 - Introduce -l option to select partitioning layout/image type driver at build time.
 - Source custom-image.sh files after sourcing configs.
 - Permit custom image type drivers to register validation functions, which are invoked during brp_init_env()
 - Add br_image_name, br_image_type and br_image_path functions which take no arguments. (Rename old br_image_path to brp_image_path).
 - Add support for DEFAULT_IMAGE_TYPE variable for project configurations to override default image type to create.
 - Fix bug/regression (command line parsing errors out with commands in second to last position). See issue ev3dev#35:
   ev3dev#35
@cmacq2
Copy link
Contributor

cmacq2 commented Jan 23, 2016

Since PR #29 has been merged, this issue can be closed now.

@dlech dlech closed this as completed Jan 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants