Code Monkey home page Code Monkey logo

Comments (12)

Profpatsch avatar Profpatsch commented on July 30, 2024 3

I renamed the issue accordingly. ;)

Joke aside, that’s a valuable lesson to learn for me as a technical writer. Make stuff copy'n'past-able without changing the execution environment midway through.

from lorri.

turboMaCk avatar turboMaCk commented on July 30, 2024 1

you're definitely right @Profpatsch. Instructions were clear but the receiver was broken. Look at it as if you're dealing with very bad input sensor on the other side (me).

from lorri.

Profpatsch avatar Profpatsch commented on July 30, 2024

Are you running this in your normal shell?

lorri direnv outputs code that is intended to be put in .envrc, which direnv calls with functions like watch_file set.

What part of the tutorial makes you think it has to be run from your shell? We might have to clarify.

from lorri.

turboMaCk avatar turboMaCk commented on July 30, 2024

Sorry for the dumb issue and late reply. I was just too busy and was not careful enough.

from lorri.

Profpatsch avatar Profpatsch commented on July 30, 2024

You’re not the first to run into this, we need to print a warning.

from lorri.

turboMaCk avatar turboMaCk commented on July 30, 2024

that would be definitely good UX improvement assuming people who can't read manual (like me) can at least read the terminal output :D

from lorri.

Profpatsch avatar Profpatsch commented on July 30, 2024

It’s easy to get wrong and if one does the why is pretty hard to debug (especially if one doesn’t know how direnv works)

from lorri.

freddie-freeloader avatar freddie-freeloader commented on July 30, 2024

This bit in here let me to the same mistake.

Create a file named .envrc in your project's root with the contents:

eval "$(lorri direnv)"

Then, run lorri watch. The first time you run lorri watch on a project, wait for it to print Completed before continuing. Leave this terminal open.

from lorri.

Profpatsch avatar Profpatsch commented on July 30, 2024

What exactly lead you to the mistake?

from lorri.

turboMaCk avatar turboMaCk commented on July 30, 2024

@freddie-freeloader do you think this makes it clearer?

from lorri.

turboMaCk avatar turboMaCk commented on July 30, 2024

@Profpatsch I think seeing a line beginning with eval makes some brains go like "this is surely a shell".

I can imagine two possible (cheap) improvements.

  1. Adding comment to the source block repeating the important part (as in my PR)
  2. Instead of showing file content add shell command to create the file itself:
echo 'eval "$(lorri direnv)"' > .envrc

from lorri.

freddie-freeloader avatar freddie-freeloader commented on July 30, 2024

@Profpatsch I think seeing a line beginning with eval makes some brains go like "this is surely a shell".

I can imagine two possible (cheap) improvements.

1. Adding comment to the source block repeating the important part (as in my PR)

2. Instead of showing file content add shell command to create the file itself:
echo 'eval "$(lorri direnv)"' > .envrc

This is exactly what I would propose. ☺️

In my case the problem was that I copied the code blindly and executed it. I know, this is not smart, but I think this is a common mistake. 🙂

from lorri.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.