-
-
Notifications
You must be signed in to change notification settings - Fork 52
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 nbb.core/invoked-script
fn
#317
Conversation
I don't think we need to set
The reason it's not set is that |
It seems like the same use cases would apply to both situations, no? |
No, since a |
Tests are failing, but the rest looks good to me |
Tests still fail, I think you need a quote around the vector in require. Perhaps consider running tests locally. |
Cool! And the last bit, can you update the changelogs? Then I'll merge |
Thanks! |
Introduces
nbb.core/invoked-script
that outputs an absolute path based on the file passed to nbb, either literally or with-m
The rationale is to be able to use
to only run things when the script is invoked, not at a repl.
The tests verify that
*file*
and(invoked-script)
are present and the same when used with-m
and passing the plain script.Please answer the following questions and leave the below in as part of your PR.
I have read the developer documentation.
This PR corresponds to an issue with a clear problem statement.
This PR contains a test to prevent against future regressions
I have updated the CHANGELOG.md file with a description of the addressed issue.