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

Invalid arguments should cause prelaunch script to fail with an error #27

Open
camall3n opened this issue Jun 18, 2020 · 4 comments
Open
Labels
bug Something isn't working

Comments

@camall3n
Copy link
Owner

camall3n commented Jun 18, 2020

For example, if ++append is used instead of +append, instead of giving an error, it silently truncates the file.

$ onager prelaunch +arg --foo 1 2 +arg --bar a b +command "./examples/myscript" +jobname test
$ onager prelaunch +arg --foo 7 +arg --bar a b c +command "./examples/myscript" +jobname test ++append
$ cat .onager/scripts/test/jobs.json

Expected output:

{
"1": ["./examples/myscript --foo 1 --bar a --tag test_1__foo_1__bar_a", "test_1__foo_1__bar_a"],
"2": ["./examples/myscript --foo 1 --bar b --tag test_2__foo_1__bar_b", "test_2__foo_1__bar_b"],
"3": ["./examples/myscript --foo 2 --bar a --tag test_3__foo_2__bar_a", "test_3__foo_2__bar_c"],
"4": ["./examples/myscript --foo 2 --bar b --tag test_4__foo_2__bar_b", "test_4__foo_2__bar_c"],
"5": ["./examples/myscript --foo 7 --bar a --tag test_5__foo_7__bar_a", "test_5__foo_7__bar_a"],
"6": ["./examples/myscript --foo 7 --bar b --tag test_6__foo_7__bar_b", "test_6__foo_7__bar_b"],
"7": ["./examples/myscript --foo 7 --bar c --tag test_7__foo_7__bar_c", "test_7__foo_7__bar_c"]
}

Actual output:

{
"1": ["./examples/myscript --foo 7 --bar a --tag test_1__foo_7__bar_a", "test_1__foo_7__bar_a"],
"2": ["./examples/myscript --foo 7 --bar b --tag test_2__foo_7__bar_b", "test_2__foo_7__bar_b"],
"3": ["./examples/myscript --foo 7 --bar c --tag test_3__foo_7__bar_c", "test_3__foo_7__bar_c"]
}
@camall3n camall3n added the invalid This doesn't seem right label Jun 19, 2020
@neevparikh
Copy link
Collaborator

Should this be closed?

@camall3n camall3n added bug Something isn't working and removed invalid This doesn't seem right labels Aug 24, 2020
@camall3n
Copy link
Owner Author

Sorry, wrong label. It's an invalid argument, not an invalid issue

@camall3n
Copy link
Owner Author

I updated the initial post to show the expected output.

@camall3n
Copy link
Owner Author

camall3n commented Jan 5, 2021

Possibly related to #34

@camall3n camall3n added this to the v0.1.3 milestone Jan 5, 2021
@camall3n camall3n modified the milestones: v0.1.3, Prelaunch upgrades Mar 10, 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
Projects
None yet
Development

No branches or pull requests

2 participants