Open spalladino opened 5 years ago
For reference, this issue can be worked around by separately installing the dependency and then linking it:
$ npm install git+https://github.com/smartcontractkit/chainlink.git#features/integrate-zos
$ zos link chainlink
I find this bug very interesting. WDYT about adding a flag to the link
command to specify which source should be used? for example:
foo@bar:~$ zos link chainlink --source https://github.com/smartcontractkit/chainlink.git#features/integrate-zos
If no source is specified, we can continue using npm
as the default.
Isn't there any way to get the package name from the installation source? A command from npm itself maybe? This would allow us to get the name automatically, without requiring the user to specify it.
Running
zos link
using a full path to github fails to link the dependency:This happens because
zos
looks for thezos.json
file in thenode_modules
folder derived from the package name, so it's trying to retrieve the file from./node_modules/git+https://github.com/smartcontractkit/chainlink.git#features/integrate-zos/zos.json
, which clearly fails.We should fetch the package name from the installation, and use that to access the zos.json file.