You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if you want to refer another script (to import, or run) you need to specify full relative path from the script base directory. But sometime it is nice to be able to refer to the script path relative to the current script. Relative paths can be identified if path string starts with characters ./ or ../.
For eg: assuming there are two scripts in script base directory as below.
foo/bar/script.groovy
foo/bar/baz/query.groovy
When you are calling query.groovy from script.groovy you should do,
RUN ("foo/bar/baz/query")
But with new enhancement, it can written as,
RUN ("./baz/query")
In otherway, calling script.groovy from query.groovy would be,
RUN ("../script")
CAUTION: Moving scripts into different directories within script base directory could cause relative path mismatches. In such cases, it is a user's responsibility of refactoring affected paths.
The text was updated successfully, but these errors were encountered:
Currently if you want to refer another script (to import, or run) you need to specify full relative path from the script base directory. But sometime it is nice to be able to refer to the script path relative to the current script. Relative paths can be identified if path string starts with characters
./
or../
.For eg: assuming there are two scripts in script base directory as below.
When you are calling
query.groovy
fromscript.groovy
you should do,But with new enhancement, it can written as,
In otherway, calling
script.groovy
fromquery.groovy
would be,CAUTION: Moving scripts into different directories within script base directory could cause relative path mismatches. In such cases, it is a user's responsibility of refactoring affected paths.
The text was updated successfully, but these errors were encountered: