diff --git a/README.md b/README.md index 44c9990..93c2895 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,9 @@ Input | Description MATLAB exits with exit code 0 if the specified script, function, or statement executes successfully without error. Otherwise, MATLAB terminates with a nonzero exit code, which causes the build to fail. To ensure that the build fails in certain conditions, use the [`assert`](https://www.mathworks.com/help/matlab/ref/assert.html) or [`error`](https://www.mathworks.com/help/matlab/ref/error.html) functions. -When you use this action, all of the required files must be on the MATLAB search path. +When you use this action, all of the required files must be on the MATLAB search path. If your script or function is not in the root of your repository, you can use the [`addpath`](https://www.mathworks.com/help/matlab/ref/addpath.html), [`cd`](https://www.mathworks.com/help/matlab/ref/cd.html), or [`run`](https://www.mathworks.com/help/matlab/ref/run.html) functions to ensure that it is on the path when invoked. For example, to run `myscript.m` in a folder `myfolder` located in the root of the repository, you can specify `command` like this: + +`command: addpath('myfolder'), myscript` ## Notes When you use the **Run MATLAB Command** action, you execute third-party code that is licensed under separate terms.