-
Notifications
You must be signed in to change notification settings - Fork 270
Description
What happened?
When a newly cloned repository with devbox v0.10.1 is opened, plugins will overwrite the existing files in devbox.d/{plugin-dir}
during the package installation phase.
This is an issue as the repository can already contain files in this directory, and this overwrite breaks the expected configuration of packages.
Steps to reproduce
setup a devbox project with mongo and it's plugin
cd $(mktemp -d)
devbox init
devbox add github:cultureamp/devbox-extras#mongodb-6_0 jq
mv devbox.json devbox.json.bak
jq '. + { "include": ["github:jetpack-io/devbox-plugins?dir=mongodb"] }' devbox.json.bak > devbox.json
devbox install
add some config to mongod.confg (we need it to run on a custom port)
export MONGOD_CONF="devbox.d/jetpack-io.devbox-plugins.mongodb/mongod.conf"
echo "" >> $MONGOD_CONF
echo "net:" >> $MONGOD_CONF
echo " port: 1234" >> $MONGOD_CONF
echo "---"
echo "updated $MONGOD_CONF file:"
cat $MONGOD_CONF
simulate the next person pulling and setting up, delete the .devbox dir and reinstall
rm -rf .devbox/
devbox install
see that $MONGOD_CONF has been reverted to it's original state
echo "---"
echo "overwritten $MONGOD_CONF file:"
cat $MONGOD_CONF
set DEVBOX_USE_VERSION=0.9.1 and MONGOD_CONF="devbox.d/jetpack-io-devbox-plugins/mongod.conf"
then run the above again and see the issue didn't exist before 0.10.0
Command
No response
devbox.json
Devbox version
0.10.1
Nix version
nix (Nix) 2.18.1
What system does this bug occur on?
macOS (Apple Silicon)
Debug logs
No response