addons/isl/src/platform/platformHelpers.tsblame
View source
b69ab311/**
b69ab312 * Copyright (c) Meta Platforms, Inc. and affiliates.
b69ab313 *
b69ab314 * This source code is licensed under the MIT license found in the
b69ab315 * LICENSE file in the root directory of this source tree.
b69ab316 */
b69ab317
b69ab318import {readAtom} from '../jotaiUtils';
b69ab319import {repositoryInfo} from '../serverAPIState';
b69ab3110export function getRepoRoot() {
b69ab3111 const info = readAtom(repositoryInfo);
b69ab3112 if (info && info.type === 'success') {
b69ab3113 return info.repoRoot.replace(/\\/g, '/');
b69ab3114 } else {
b69ab3115 return undefined;
b69ab3116 }
b69ab3117}