-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfig.t
More file actions
36 lines (31 loc) · 1.17 KB
/
Copy pathconfig.t
File metadata and controls
36 lines (31 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Config reflects sandboxed XDG env vars and the default registry URL.
$ export OI_DATA_DIR=$PWD/data
$ export OI_CACHE_DIR=$PWD/cache
$ oi config 2>&1 | grep -q "data: $PWD/data"
$ oi config 2>&1 | grep -q "cache: $PWD/cache"
$ oi config 2>&1 | grep -q "https://oi.thicket.dev"
XDG_DATA_HOME / XDG_CACHE_HOME are used as fallbacks when OI_* are unset.
$ unset OI_DATA_DIR OI_CACHE_DIR
$ export XDG_DATA_HOME=$PWD/xdg-data
$ export XDG_CACHE_HOME=$PWD/xdg-cache
$ oi config 2>&1 | grep -q "data: $PWD/xdg-data/oi"
$ oi config 2>&1 | grep -q "cache: $PWD/xdg-cache/oi"
Project metadata shown by 'oi config'.
$ cat > app.opam <<EOF
> opam-version: "2.0"
> maintainer: "x"
> authors: "x"
> homepage: "x"
> bug-reports: "x"
> license: "ISC"
> dev-repo: "git+x"
> synopsis: "x"
> x-repos: [ "https://example.com/r" ]
> pin-depends: [ ["foo.dev" "git+https://example.com/foo.git"] ]
> depends: [ "fmt" ]
> EOF
$ oi config 2>&1 | grep -E '^Project|^ extra-|^ foo\.dev'
Project extra repositories:
extra-7ae45f29f2 https://example.com/r
Project pin-depends:
foo.dev git+https://example.com/foo.git