Skip to content

Commit 0f420b1

Browse files
committed
config function
the config function redirects to the resource function using 'config' as the first parameter and the given parameter as the second parameter
1 parent 1e7598d commit 0f420b1

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ passed then **resources** will be used.
272272

273273
Returns the file $SODA_USER_HOME/$type/$NAMESPACE/$path using the namespace of the invoked task or
274274
imported namespace without checking if the file exists. If the *type* is not passed then
275-
**resources** will be used.
275+
**resources** will be used. For use with the **config** type, use the `config` builtin function.
276276

277277
### invoke (description, function_name)
278278

scripts/core.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
2323
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2424

25-
SODA_VERSION="1.2.2"
25+
SODA_VERSION="1.3.0"
2626

2727
# Stores the usage for exposed commands
2828
TASKS_USAGE=" TASKS:"
@@ -322,6 +322,11 @@ resource() {
322322
echo "$SODA_USER_HOME/$folder/$NAMESPACE/$filename"
323323
}
324324

325+
# Returns a resource in "config" folder based on the current namespace.
326+
config() {
327+
resource config $1
328+
}
329+
325330
# Checks if a resource exists based on the current namespace.
326331
exists() {
327332
FILE="$(resource "$@")"

0 commit comments

Comments
 (0)