appendToPATH method

  1. @override
bool appendToPATH(
  1. String path
)
override

Appends the given path to the bash path if it isn't already on the path.

Implementation

@override
bool appendToPATH(String path) {
  // ignore: flutter_style_todos
  /// TODO(bsutton): check if there is already an export
  /// for dcli path.
  if (!isOnPATH(path)) {
    final export = 'export PATH=\$PATH:$path';
    _updatePATH(export);
  }
  return true;
}