-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add --path flag #53
Add --path flag #53
Conversation
This change allow us to provide a directory that create and load the `corral.json` file. It affects most commands as they mostly need to load the file before doing their job. So, from now on, we can pass the `--path "path/to/the/bundle/dir/" argument. Solves ponylang#23.
So, I took the liberty to include the |
@cquinn you are the subject matter expert. Can you give this a review? |
@ordepdev thoughts on tests that can be added with this change? |
@SeanTAllen I can add tests for creating the Something like this maybe: class iso _TestCreateBundleInCustomPath is UnitTest
fun name(): String => "bundle/create-in-custom-path"
fun apply(h: TestHelper) ? =>
let log = Log(LvlFine, h.env.err, LevelLogFormatter)
let expected = FilePath(h.env.root as AmbientAuth, "tmp")?
match BundleFile.create_bundle(h.env, "tmp", log)
| let bundle: Bundle =>
h.assert_eq[String](expected.path, bundle.dir.path)
end |
9fad5fd
to
b650da7
Compare
@ordepdev do you want to squash this and push so you can control the commit message or shall I squash and merge? |
You can squash and merge with the first commit message. |
Thanks, @ordepdev. |
This change allows us to provide a directory for creating and loading both
corral.json
anddep-lock.json
files. It affects most commands as they mostly need to load the file before doing their job. So, from now on, we can pass the--path "path/to/the/bundle/dir/"
argument.corral[master] % mkdir tmp corral[master] % corral init --path tmp init: from dir tmp INFO: Created bundle in /Users/ordepdev/Work/corral/tmp FINE: Going to write /Users/ordepdev/Work/corral/tmp/corral.json INFO: Writing /Users/ordepdev/Work/corral/tmp/corral.json FINE: Going to write /Users/ordepdev/Work/corral/tmp/lock.json INFO: Writing /Users/ordepdev/Work/corral/tmp/lock.json INFO: init: created: tmp
Solves #23.