findWorkspaceRoot function

  1. @Deprecated('Use findWorkspaceRootOrNull and decide at the call site what no ' 'workspace means.')
String findWorkspaceRoot(
  1. String startPath
)

The workspace root of startPath (findWorkspaceRootOrNull), or startPath itself when it is not inside a workspace.

Implementation

@Deprecated(
  'Use findWorkspaceRootOrNull and decide at the call site what no '
  'workspace means.',
)
String findWorkspaceRoot(String startPath) =>
    findWorkspaceRootOrNull(startPath) ?? startPath;