Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
build(design-tokens): Fix bazel build on windows. Specified paths onl…
Browse files Browse the repository at this point in the history
…y uses / and so splitting with / is ok.
  • Loading branch information
andreas-doppelhofer committed Sep 16, 2020
1 parent daced52 commit 10923ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/design-tokens/build/src/utils/find-common-root-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* limitations under the License.
*/

import { sep, join } from 'path';
import { join } from 'path';

/** Finds the innermost folder that contains all the given paths */
export function findCommonRootPath(paths: string[]): string | undefined {
for (const path of paths) {
const pathParts = path.split(sep);
const pathParts = path.split('/');

for (let i = pathParts.length - 1; i >= 0; i--) {
const subPath = join(...pathParts.slice(0, i));
Expand Down

0 comments on commit 10923ce

Please sign in to comment.