vpkg-project / vpkg

An alternative package manager for V.
https://vpkg-project.github.io
MIT License
115 stars 10 forks source link

vpkg get and vpkg update fail if the lock file is missing (and it is right after vpkg init) #2

Closed spytheman closed 5 years ago

spytheman commented 5 years ago
0[11:37:12]delian@nemesis: /v/vpkg/xxx $ vpkg init
Package manifest file was created successfully.
0[11:37:15]delian@nemesis: /v/vpkg/xxx $ ls -la
total 12
drwxrwxr-x 2 delian delian 4096 сеп 22 11:37 ./
drwxrwxr-x 4 delian delian 4096 сеп 22 11:37 ../
-rw-rw-r-- 1 delian delian  161 сеп 22 11:37 vpkg.json
0[11:37:16]delian@nemesis: /v/vpkg/xxx $ cat vpkg.json
{
   "name": "xxx",
   "version": "1.0"
   "author": ["Author Name <author@example.com>"],
   "repo": "https://github.com/username/repo",
   "dependencies": []
}0[11:37:18]delian@nemesis: /v/vpkg/xxx $ vpkg get
Cannot read /v/vpkg/xxx
Error in decode() for Lockfile error_ptr=: %s
0[11:37:32]delian@nemesis: /v/vpkg/xxx $ ls -la
total 16
drwxrwxr-x 2 delian delian 4096 сеп 22 11:37 ./
drwxrwxr-x 4 delian delian 4096 сеп 22 11:37 ../
-rw-rw-r-- 1 delian delian  161 сеп 22 11:37 vpkg.json
-rw-rw-r-- 1 delian delian   42 сеп 22 11:37 .vpkg-lock.json
0[11:37:45]delian@nemesis: /v/vpkg/xxx $ cat .vpkg-lock.json
{
   "version": "0.5",
   "packages": []
}0[11:37:48]delian@nemesis: /v/vpkg/xxx $ vpkg get
0 package was installed successfully.
0[11:37:50]delian@nemesis: /v/vpkg/xxx $ vpkg update
Fetching lockfile
Updating packages
0 package was updated successfully.
0[11:38:07]delian@nemesis: /v/vpkg/xxx $ ls -la
total 16
drwxrwxr-x 2 delian delian 4096 сеп 22 11:37 ./
drwxrwxr-x 4 delian delian 4096 сеп 22 11:37 ../
-rw-rw-r-- 1 delian delian  161 сеп 22 11:37 vpkg.json
-rw-rw-r-- 1 delian delian   46 сеп 22 11:38 .vpkg-lock.json
0[11:38:10]delian@nemesis: /v/vpkg/xxx $ rm .vpkg-lock.json
0[11:38:16]delian@nemesis: /v/vpkg/xxx $ vpkg update
Fetching lockfile
Cannot read /v/vpkg/xxx
Error in decode() for Lockfile error_ptr=: %s
0[11:38:19]delian@nemesis: /v/vpkg/xxx $ vpkg update
Fetching lockfile
Updating packages
0 package was updated successfully.
0[11:38:20]delian@nemesis: /v/vpkg/xxx $
nedpals commented 5 years ago

@spytheman fixed 😃