fix hashing utility changing cwd
							parent
							
								
									e077b50e2b
								
							
						
					
					
						commit
						b7ffbf143c
					
				|  | @ -755,10 +755,13 @@ class LFSHashing { | ||||||
|     } |     } | ||||||
|     static hashAllFiles(folder) { |     static hashAllFiles(folder) { | ||||||
|         return __awaiter(this, void 0, void 0, function* () { |         return __awaiter(this, void 0, void 0, function* () { | ||||||
|             process.chdir(`${folder}`); |             const startPath = process.cwd(); | ||||||
|             return yield (yield cloud_runner_system_1.CloudRunnerSystem.Run(`find -type f -exec md5sum "{}" + | sort | md5sum`)) |             process.chdir(folder); | ||||||
|  |             const result = yield (yield cloud_runner_system_1.CloudRunnerSystem.Run(`find -type f -exec md5sum "{}" + | sort | md5sum`)) | ||||||
|                 .replace(/\n/g, '') |                 .replace(/\n/g, '') | ||||||
|                 .split(` `)[0]; |                 .split(` `)[0]; | ||||||
|  |             process.chdir(startPath); | ||||||
|  |             return result; | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -31,9 +31,12 @@ export class LFSHashing { | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   public static async hashAllFiles(folder: string) { |   public static async hashAllFiles(folder: string) { | ||||||
|     process.chdir(`${folder}`); |     const startPath = process.cwd(); | ||||||
|     return await (await CloudRunnerSystem.Run(`find -type f -exec md5sum "{}" + | sort | md5sum`)) |     process.chdir(folder); | ||||||
|  |     const result = await (await CloudRunnerSystem.Run(`find -type f -exec md5sum "{}" + | sort | md5sum`)) | ||||||
|       .replace(/\n/g, '') |       .replace(/\n/g, '') | ||||||
|       .split(` `)[0]; |       .split(` `)[0]; | ||||||
|  |     process.chdir(startPath); | ||||||
|  |     return result; | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue