Remove use of cd in make-lockfile.
@@ -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))
+ (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))
- (os/cd "..")))
+ (array/push packages package)))
# Put in correct order, such that a package is preceded by all of its dependencies
(def ordered-packages @[])
(def resolved @{})
