Cyfrin / foundry-full-course-cu

GNU General Public License v3.0
3.4k stars 831 forks source link

source .env #1235

Closed Vodvalex closed 8 months ago

Vodvalex commented 9 months ago

I am trying to execute a command $ source .env. Also I am in the folder : foundry-simple-storage-f23.Unfortunately it shows: "bash: .env: No such file or directory" I have checked twice that the .env in the in the Gitignore folder under #Dotenv file I have saved the .env in the test folder. May be someone else also have got the same problem? PLease help. Thank you.

Mohsen2083 commented 9 months ago

Hello @Vodvalex.

  1. make sure you are putting no space next to "=" meaning: PUBLIC_KEY=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, not PUBLIC_KEY = 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

  2. your .env file should not be inside your test folder and your folder should look like something like this:

Screenshot 2023-12-24 151211

  1. after making sure you are creating .env file in the right position try typing source .env inside your bash terminal. I hope this helps,
Vodvalex commented 9 months ago

Dear @Mohsen2083 .Thank you very much for your help.I have followed your clear explaination and this time it did work. Your help is much appriciated.

Mohsen2083 commented 9 months ago

Dear @Mohsen2083 .Thank you very much for your help.I have followed your clear explaination and this time it did work. Your help is much appriciated.

Glad that I could be of assistance fren😸😸😸

darom1998 commented 8 months ago

Thanks Mohsen2083 it's working properly

cromewar commented 8 months ago

seems to be solved.