Documentation

Every command that reads a profile finds it the same way, so this is the one page to blame when glaze up builds the wrong workspace. The rules are short. Most of the page is about the two mistakes I made myself ( a GLAZE_PATH that pointed at the file and a ~user path that I assumed would just work ).

Search order

glaze up, glaze down and glaze format locate a profile in this order:

  1. The --profile-path <path> value, if you supply it.
  2. .glaze in the current working directory.
  3. $GLAZE_PATH/.glaze.

The first match wins. When no step finds a profile, glaze exits with code 3 and lists the three steps it tried.

GLAZE_PATH names the directory that holds .glaze, not the file. When GLAZE_PATH names the file, the error says so and names the directory to set instead.

Console
$ export GLAZE_PATH=~/profiles      # correct: the directory
$ export GLAZE_PATH=~/profiles/.glaze   # wrong: glaze tells you to set ~/profiles

Tilde expansion

Glazier expands ~ and ~/ to your home directory in --profile-path, $GLAZE_PATH and starting_directory. It does not expand ~user. A path that starts with ~user is an error.

Console
$ glaze up --profile-path '~nobody/.glaze'
glaze profile not found: glaze expands only `~` and `~/`, not `~user`

Glazier also fails when it cannot find your home directory.

A directory where a file is expected

When a path names a directory where glaze expects a file, or a file where glaze expects a directory, the error says which one it found.

Console
$ glaze up --profile-path ./gigs
glaze profile not found: `./gigs` is a directory; --profile-path must name a profile file

The same check applies to .glaze in the current directory and to $GLAZE_PATH/.glaze. A directory named .glaze is not a profile.

When the current directory is gone

A deleted working directory makes step 2 impossible on Linux. Glazier then skips the current directory and still tries GLAZE_PATH. See Variables for what happens to path.pwd in that case.

Commands that skip resolution

glaze down --session <name> kills the named session and reads no profile. glaze ls reads no profile. glaze save writes to --profile-path ( the default is .glaze ) and does not search for an existing profile. See down and save.

Why the directory and not the file?

Because the file has one fixed name. GLAZE_PATH exists for the case where you keep one shared profile somewhere outside the project and want every directory without its own .glaze to fall back to it. If you need many named profiles, use --profile-path, or read One profile, many projects and let variables do the work instead.