How to update environment variables in an existing notebook

When I add a new environment variable, it seems like my existing notebooks don’t pick it up. Steps to reproduce:

  1. Create a notebook
  2. In the notebook, output the value of process.env.FOO
    The contents should be undefined (unless you already have a FOO)
  3. Add an environment variable, named FOO, contents “baz”
  4. Refresh the notebook.
  5. process.env.FOO will still be undefined
  6. Clone the notebook.
  7. FOO still undefined
  8. Make a new notebook that outputs process.env.FOO
  9. See baz as expected.
  10. Scratch head, write a discourse question.

Am I missing something? What I’d love to see here is the environment variable getting propagated through my existing notebooks, or providing a way to “rebase” my notebook into the world where that environment variable exists.

Wonderful tool, btw, having a lot of fun with it. :slight_smile:

The output of a notebook is fixed – it’s the value when you executed the code. If you want the output to reflect a new environment variable, you just need to re-execute the code.

Hm, odd, I did try pressing shift-return yesterday to re-run the code and it wasn’t working, but today it does. Possibly user error. Thanks!