iterative/vscode-dvc

View on GitHub
extension/src/cli/dvc/cwd.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { realpathSync } from 'fs'

export const getCaseSensitiveCwd = (path: string): string => {
  try {
    const cwd = realpathSync.native(path)
    if (cwd) {
      return cwd
    }
  } catch {}
  return path
}