Skip to content

Commit

Permalink
Merge pull request #131 from flox/brendan/98/install-to-default-env-i…
Browse files Browse the repository at this point in the history
…nstructions

docs(default-environment.md): install to "default" from other dirs
  • Loading branch information
brendaneamon authored Feb 4, 2025
2 parents d33b879 + 9b54680 commit dcacda7
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions docs/tutorials/default-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ so let's take a look at how to set it up.
## Initial setup

At the most basic level,
the `default` enviroment is simply an environment in your home directory.
the `default` environment is simply an environment in your home directory.
Since you're unlikely to do development in your home directory we treat this
environment specially.

Expand Down Expand Up @@ -119,7 +119,27 @@ $ flox install hello
'hello' installed to environment 'default'
```

It worked (though you shouldn't be surprised, Flox is awesome)!
It worked (though you shouldn't be surprised; Flox is awesome)!

## Installing packages to the default environment from another Flox environment

If you're in a project directory with an existing Flox environment,
unsurprisingly, running `flox install <pkg>` will install the package
to the environment in that directory, rather than your default environment.

Nevertheless, it's still easy to install whatever you wish to your `default`
environment.
All you need to do is pass the `-d` argument to the `install` command, like so:

```bash
flox install -d ~ hello
```

When you do this, you should see the following output, indicating success:

```console
✅ 'hello' installed to environment 'default'
```

## Customization

Expand Down

0 comments on commit dcacda7

Please sign in to comment.