From 882bfeddff4cdc7f2cbb52940578b600c8e162b5 Mon Sep 17 00:00:00 2001 From: gonzaloriestra <14979109+gonzaloriestra@users.noreply.github.com> Date: Sat, 22 Aug 2026 00:18:28 +0000 Subject: [PATCH] [Refactor] Simplify control flow in relativizePath with early return Remove unnecessary else block after return in relativizePath. --- packages/cli-kit/src/public/node/path.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/cli-kit/src/public/node/path.ts b/packages/cli-kit/src/public/node/path.ts index f3721780110..68d9411327e 100644 --- a/packages/cli-kit/src/public/node/path.ts +++ b/packages/cli-kit/src/public/node/path.ts @@ -138,9 +138,8 @@ export function relativizePath(path: string, dir: string = cwd()): string { const relativeComponents = relativePath.split('/').filter((component) => component === '..').length if (result === '/' || relativePath === '' || relativeComponents > 2) { return path - } else { - return relativePath } + return relativePath } /**