Skip to content

Commit

Permalink
Use DENO_INSTALL_ROOT to make deno install to ~/.local
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Mar 30, 2024
1 parent 6188c85 commit b38eda4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions projects/deno.land/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ runtime:
env:
DENO_NO_UPDATE_CHECK: 'true'
DENORT_BIN: '{{prefix}}/bin/denort'
DENO_INSTALL_ROOT: '${{home}}/.local/bin'

dependencies:
x86-64:
Expand All @@ -35,11 +36,6 @@ build:
fi
if: '>=1.25.0<1.25.4'
# change default bindir to ~/.local/bin per our conventions
- sed -i'' -e 's/home_path.push(".deno")/home_path.push(".local")/' cli/tools/installer.rs

- grep home_path cli/tools/installer.rs

- cargo install --locked --path cli --root "{{ prefix }}"
dependencies:
git-scm.org: 2 # to build tinycc
Expand All @@ -57,8 +53,12 @@ test:
script:
- deno --version | grep {{version}}
- mv $FIXTURE test.ts
# tests our default DENO_INSTALL_ROOT
- deno install -f test.ts
- test "$($HOME/.local/bin/test)" = "Hello, world!"
# allows to override DENO_INSTALL_ROOT
- DENO_INSTALL_ROOT=/tmp deno install -f test.ts
- test "$(/tmp/test)" = "Hello, world!"
- deno compile test.ts
- test "$(./test)" = "Hello, world!"
# human readable size of ./test should be equal to the size of denort to ensure our denort is being used
Expand Down

0 comments on commit b38eda4

Please sign in to comment.