forge install modifies top-level .gitmodules in existing project repo instead of where foundry.toml
lives
#3962
Labels
C-forge
Command: forge
Cmd-forge-pm
Command: forge install/update/remove
T-bug
Type: bug
T-to-investigate
Type: to investigate
Milestone
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (d3d8c0b 2022-12-26T00:04:10.853709324Z)
What command(s) is the bug in?
forge install
Operating System
Linux
Describe the bug
Repro
src/admin, src/analysis, src/some_project, src/blockchain_proj
, alsotouch .gitmodules
so there's one at the top levelblockchain_proj
needs to write.sol
, so will use foundry. Go make the backend there w/cd src/blockchain_proj && foundry init backend_contract_proj1
cd backend_contract_proj1
, Runforge install openzeppelin/openzeppelin-contracts --no-commit
This will add new code into my top-level
.gitmodules
, instead of creating asrc/blockchain_proj/backend_contract_proj1/.gitmodules
, which is diff from how npm, pip/poetry, etc all do it. They will detect the top-level "for the project" (i.e. where foundry.tml lives @src/blockchain_proj/backend_contract_proj1/foundry.toml
) and modify any .git files there, instead of always going all the way up to the top of the root.What's the best way to get
forge install
to stop doing this? I tried creating asrc/blockchain_proj/backend_contract_proj1/.gitmodules
but everytime I install it still installs into my top-level.gitmodules
and I have to copy paste it overThe text was updated successfully, but these errors were encountered: