mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 07:33:01 +00:00 
			
		
		
		
	Remove use of cd in make-lockfile.
This commit is contained in:
		
							
								
								
									
										14
									
								
								auxbin/jpm
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								auxbin/jpm
									
									
									
									
									
								
							| @@ -683,14 +683,12 @@ int main(int argc, const char **argv) { | ||||
|   (def cwd (os/cwd)) | ||||
|   (def packages @[]) | ||||
|   # Read installed modules from manifests | ||||
|   (os/cd (find-manifest-dir)) | ||||
|   (defer (os/cd cwd) | ||||
|     (each man (os/dir ".") | ||||
|       (def package (parse (slurp man))) | ||||
|       (if (or (not package :repo) (not package :sha)) | ||||
|         (print "Cannot add local package " man " to lockfile, skipping...") | ||||
|         (array/push packages package)) | ||||
|       (os/cd ".."))) | ||||
|   (def mdir (find-manifest-dir)) | ||||
|   (each man (os/dir mdir) | ||||
|     (def package (parse (slurp (string mdir sep man)))) | ||||
|     (if (or (not (package :repo)) (not (package :sha))) | ||||
|       (print "Cannot add local package " man " to lockfile, skipping...") | ||||
|       (array/push packages package))) | ||||
|   # Put in correct order, such that a package is preceded by all of its dependencies | ||||
|   (def ordered-packages @[]) | ||||
|   (def resolved @{}) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose