addPath function

void addPath(
  1. String path
)

Prepends a directory to the system PATH variable for all subsequent actions in the current job.

The current action CANNOT access the new path variable.

Implementation

void addPath(String path) {
  final file = Platform.environment['GITHUB_PATH'];
  if (file != null) {
    _appendToFile(file, path);
  } else {
    _echo('add-path', path);
  }
}