481 B18 lines
Blame
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8import {readAtom} from '../jotaiUtils';
9import {repositoryInfo} from '../serverAPIState';
10export function getRepoRoot() {
11 const info = readAtom(repositoryInfo);
12 if (info && info.type === 'success') {
13 return info.repoRoot.replace(/\\/g, '/');
14 } else {
15 return undefined;
16 }
17}
18