dfinity / sdk

IC SDK: a Software Development Kit for creating and managing canister smart contracts on the ICP blockchain.
https://internetcomputer.org/developers
Apache License 2.0
170 stars 82 forks source link

`.env` is not written #3758

Closed vporton closed 3 months ago

vporton commented 3 months ago

The last master (f8281fe501756486c52cefc9d03eb0d687b550cf) does not create .env file when running

dfx deploy <canister>

for a canister that does not have post_install command.

It is related by that now get_and_write_environment_variables is called from run_post_install_task that is called under:

if !canister_info.get_post_install().is_empty() {

and my canister does not have post-install command.

This error interferes with my debugging of https://github.com/dfinity/sdk/pull/3710 - So, I urge you to fix this bug ASAP (and notify me by closing this issue).

vporton commented 3 months ago

bats e2e/tests-dfx/dotenv.bash passed well on master. The bug yet exists however for https://github.com/dfinity/sdk/pull/3710/files PR.

vporton commented 3 months ago

Now it works on https://github.com/dfinity/sdk/pull/3710, too (e2e/tests-dfx/dotenv.bash test passed).

vporton commented 3 months ago

Closing.