Showing the changes to apps/server/src/sourceControl/SourceControlRepositoryService.ts (1 of 186 files). Show all
Unified · Split
| @@ -153,13 +153,11 @@ export const make = Effect.fn("makeSourceControlRepositoryService")(function* () · 152 unmodified lines | ||
| 153 | 153 | function* (destinationPath: string) { |
| 154 | 154 | const trimmed = destinationPath.trim(); |
| 155 | 155 | if (trimmed.length === 0) { |
| 156 | − return yield* Effect.fail( | |
| 157 | − repositoryError({ | |
| 158 | − operation: "cloneRepository", | |
| 159 | − provider: "unknown", | |
| 160 | − detail: "Choose a destination path before cloning.", | |
| 161 | − }), | |
| 162 | − ); | |
| 156 | + return yield* repositoryError({ | |
| 157 | + operation: "cloneRepository", | |
| 158 | + provider: "unknown", | |
| 159 | + detail: "Choose a destination path before cloning.", | |
| 160 | + }); | |
| 163 | 161 | } |
| 164 | 162 | |
| 165 | 163 | return path.resolve(expandHomePath(trimmed, path)); |
| @@ -183,13 +181,11 @@ export const make = Effect.fn("makeSourceControlRepositoryService")(function* () · 17 unmodified lines | ||
| 183 | 181 | ), |
| 184 | 182 | ); |
| 185 | 183 | if (entries.length > 0) { |
| 186 | − return yield* Effect.fail( | |
| 187 | − repositoryError({ | |
| 188 | − operation: "cloneRepository", | |
| 189 | − provider: "unknown", | |
| 190 | − detail: "Destination path already exists and is not empty.", | |
| 191 | − }), | |
| 192 | − ); | |
| 184 | + return yield* repositoryError({ | |
| 185 | + operation: "cloneRepository", | |
| 186 | + provider: "unknown", | |
| 187 | + detail: "Destination path already exists and is not empty.", | |
| 188 | + }); | |
| 193 | 189 | } |
| 194 | 190 | } else { |
| 195 | 191 | yield* fileSystem.makeDirectory(path.dirname(normalizedDestination), { recursive: true }); |
| @@ -222,13 +218,11 @@ export const make = Effect.fn("makeSourceControlRepositoryService")(function* () · 26 unmodified lines | ||
| 222 | 218 | } |
| 223 | 219 | |
| 224 | 220 | if (!remoteUrl) { |
| 225 | − return yield* Effect.fail( | |
| 226 | − repositoryError({ | |
| 227 | − operation: "cloneRepository", | |
| 228 | − provider, | |
| 229 | − detail: "Enter a repository path or clone URL before cloning.", | |
| 230 | − }), | |
| 231 | − ); | |
| 221 | + return yield* repositoryError({ | |
| 222 | + operation: "cloneRepository", | |
| 223 | + provider, | |
| 224 | + detail: "Enter a repository path or clone URL before cloning.", | |
| 225 | + }); | |
| 232 | 226 | } |
| 233 | 227 | |
| 234 | 228 | yield* git.execute({ |